Objective To explore the medication rule and mechanism of Traditional Chinese Medicine for the treatment of lung cancer brain metastasis based on data mining and network pharmacology. Methods (1) Literature of Traditional Chinese Medicine for the treatment of lung cancer brain metastasis was retrieved from the databases of China National Knowledge Infrastructure, Wanfang Data Knowledge Service Platform, VIP, Chinese Biomedical Literature Service System. Information such as prescriptions and Traditional Chinese Medicine compositions were extracted from the literature. The use frequency of drugs, and drug frequency of property, flavor, and meridian were analyzed. The associated rule analysis and cluster analysis were conducted. (2) Effective active components of the core drug pairs were collected and screened from Traditional Chinese Medicine Systems Pharmacology Database and Analysis Platform, HERB database, and The Encyclopedia of Traditional Chinese Medicine database, and their effect targets were obtained by using the SwissTargetPrediction platform. Disease targets of lung cancer brain metastasis were retrieved from the databases of DrugBank, GeneCards®, and DisGeNET. After obtaining the intersection of the two, protein⁃protein interaction network and drugs⁃components⁃targets network were established for screening the core targets and main active components, and then enrichment analysis was conducted, as well as molecular docking technique was employed to perform validation. Results A total of 46 literature was enrolled, containing 47 prescriptions, concerning 204 flavors of Traditional Chinese Medicines in total. The total use frequency was 853 times, and drug properties were mainly cold, warm, and moderate, drug flavors were mainly sweet, bitter and acrid, and meridians were mainly lung meridian, liver meridian, and spleen meridian. Ten drug pairs were obtained by the associated rule analysis, therein Hedysarum multijugum⁃Pheretima was the core drug pair. A total of 4 categories of drug combinations were obtained by cluster analysis. The main active components of Hedysarum multijugum⁃Pheretima were kumatakenin, dihydrocapsaicin, hederagenin, and myristoleic acid, etc., mainly acting on the core targets with respect to tyrosine kinase, tumor suppressor protein, cytochrome P450 family 1 subfamily A member 1, signal transducer and activator of transcription 3 (STAT3), etc., as well as exerting therapeutic effect through cancer pathway, proteoglycan in cancer, phosphoinositide 3⁃kinase/protein kinase B signaling pathway, etc. Molecular docking revealed that the main active components docked well with the core targets, among which hederagenin had the best binding to STAT3. Conclusion The pathogenesis of lung cancer brain metastasis belongs to deficiency in nature and excess in superficiality. Deficiency, heat, phlegm, blood stasis, and wind are the basic pathological factors. The main therapeutic principle of Traditional Chinese Medicine for the treatment of lung cancer brain metastasis is reinforcing the healthy qi to eliminate pathogenic factors, and its core drugs play a therapeutic role through multi⁃components, multi⁃targets and multi⁃pathways.