Objective:To investigate the relationship between cerebrospinal fluid (CSF) analysis and e diagnosis and prognosis of leptomeningeal metastasis (LM) in patients with non-small cell lung cancer (NSCLC).Methods:A retrospective cohort study was conducted. A total of 115 treatment-na?ve patients with newly diagnosed NSCLC were enrolled by simple random sampling from the Department of Medical Oncology, Beijing Tiantan Hospital Affiliated to Capital Medical University, between January 10, 2021 and October 22, 2023. The cohort included 45 males [aged (58.60±10.10) years] and 70 females [aged (56.96±11.51) years]. Of the 115 patients, 34 without LM were assigned to the non-LM group, and 81 with LM to the LM group, which was further divided into a survival ≤1 year subgroup ( n=27) and a survival >1 year subgroup ( n=54). Statistical analyses were performed on CSF parameters including tumor cell percentage, tumor markers, protein, and lactate to compare differences between groups. Results:Characteristic tumor cells were found in the CSF of NSCLC patients with LM. CSF carcinoembryonic antigen (CEA) was significantly higher in the LM group [45.94 (6.23, 121.60) ng/ml] than in the non-LM group [0.50 (0.20, 3.45) ng/ml] with a statistically significant difference ( P<0.001). Similarly, CSF cytokeratin 19 fragment (CYFRA211) were higher in the LM group [7.06 (2.21, 13.21) ng/ml] than in the non-LM group [0.70 (0.61, 1.34) ng/ml] ( P<0.001), and CSF lactate were also higher in the LM group [2.80 (2.20, 3.80) mmol/L] than in the non-LM group [1.70 (1.60, 2.28) mmol/L] ( P<0.001). After two cycles of treatment, the changes in CSF tumor cell percentage (posttreatment minus pretreatment) were lower in patients with survival ≤1 year [-0.2% (-4.0%, 1.0%)] than in those with survival >1 year [-5.0% (-14.5%, -1.0%)] with a significant difference ( P=0.001). Similarly, the changes in CSF CEA (posttreatment minus pretreatment) were lower in survival ≤1 year subgroup [-0.60 (-51.93, 0.22) ng/ml] than in the survival >1 year subgroup [-24.15 (-768.07, -2.76) ng/ml] ( P<0.05). Conclusions:The detection of tumor cells in CSF is a key diagnostic criterion for LM in NSCLC. CSF CEA and CYFRA21-1 can be uesed as adjunctive markers for the diagnosis of LM. Moreover, in the percentage CSF tumor cells and its changes as well as changes in CEA, can provide valuable references for evaluating treatment efficacy and predicting prognosis in NSCLC patients with LM.