Inclusion Criteria:  Patients diagnosed with non-small cell lung cancer (NSCLC) by histology or cytology, and with brain and leptomeningeal metastases. For LM patients, the diagnosis of leptomeningeal metastasis requires detection of cancer cell or EGFR mutation in the CSF. Presence of an activating EGFR-sensitive mutations (including exon 19 deletions, L858R, the above mentioned mutations alone or co-existed with other EGFR-mutated sites). A positive T790M mutation is required for patients who have progressed following prior 1/2 generation EGFR-TKI therapy. Stable brain/leptomeningeal metastases that do not require immediate or planned local treatment for it during the study period. Presence of intracranial and extracranial measurable lesions without local treatment at the same time. The ECOG score is 0-2 (including 0 and 2), and there is no deterioration 2 weeks before the study, and the expected survival is not less than 3 months.  Adequate bone marrow reserve or organ function as demonstrated by any of the following laboratory values:  Absolute neutrophil count ≥1.5×109/L and white blood cell count ≥3×109/L; Platelet count ≥100×109/L; Hemoglobin ≥90g/L; Serum creatinine ≤1.5× upper normal limit (ULN) and creatinine clearance ≥50 mL/min (calculated according to the Cockcroft and Gault formula); AST and ALT≤2.5×ULN if no confirmed liver metastasis; AST, ALT≤5×ULN if confirmed liver metastasis; Total bilirubin ≤1.5×ULN in the absence of proven liver metastasis; total bilirubin ≤3×ULN in patients with proven liver metastasis or Gilbert syndrome (hyperindirect bilirubinemia); International standardized ratio (INR) ≤1.5, and activated partial prothrombin time (APTT) ≤1.5×ULN. Male patients and female patients of reproductive age should take adequate contraceptive measures from signing informed consent to 3 months after the last study drug treatment; Women of childbearing age have negative pregnancy test results within 7 days of the first dose. Patients having recovered from all grade ≤ 1 toxicities related to previous anticancer therapies (CTCAE v 5.0) except for alopecia, platinum-therapy-related neuropathy (where ≤2 is allowed) before first dose of study treatment. Patients can understand and voluntarily sign the informed consent form. Patient able to comply with study requirements.  Exclusion Criteria:  Any of the following treatment:  Previous treatment with 3rd generation EGFR inhibitor (Osimertinib, Almonertinib, Furmonertinib, etc.)； The time from the treatment of reversible EGFR-TKI (e.g., Gefitinib, Erlotinib, Icotinib) to the first administration of the drug in this study did not exceed 8 days or 5 half-lives (whichever is longer); the time from the treatment of irreversible EGFR-tkis (e.g., Afatinib, Dacomitinib, Neratinib, etc.) do not exceed 14 days or 5 half-lives (whichever is longer)； Previous treatment with Systematic antitumor therapy, including standard chemotherapy, biotherapy and immunodrug therapy within 28 days before the first dose of the study drug, and traditional Chinese medicine antitumor therapy within 7 days before the first dose of the study drug. Receiving radiation to more than 30% of the bone marrow or with a wide field of radiation that had to be completed within 28 days of the first dose of study treatment; Radiotherapy with a limited field of radiation within 7 days of the first dose of study treatment or palliative radiation therapy for bone metastasis; Previous treatment with whole brain radiotherapy (WBRT). Patients who have previously received stereotactic radiotherapy (SRT) or other CNS local treatments (such as intrathecal chemotherapy) can be enrolled if the time from the completion of treatment to the initial study medication is more than 2 weeks; Uncontrollable pleural and abdominal effusion. For patients with pleural effusion, pleural effusion should be stabilized for 2 weeks prior to initial medication (diuretics, pleural effusion or pleural infusion are not allowed during this period); Major surgery within 4 weeks of the first dose of study treatment; Patients currently receiving (or at least within 14 days prior to receiving the first dose )medications or herbal supplements known to be potent inhibitors or inducers of cytochrome P450 isoenzyme (CYP)3A4. Patients who are receiving and need to continue receiving medications during the study that are known to prolong the QTc interval or may cause tachycardia; Participants in other clinical trials (other than non-interventional clinical trials) within 28 days prior to the first administration of the investigational drug. Patients with leptomeningeal metastases (LM) who cannot be examined with enhanced MRI. Presence of leptomeningeal metastases only. Patients with CNS complications requiring emergency neurosurgical treatment (e.g. surgery, etc.). Patients with CNS symptoms should be controlled by glucocorticoids with an equivalent dose of more than 5mg dexamethasone 5 days prior to initial administration. Patients have spinal cord compression caused by tumor. Clinically severe gastrointestinal dysfunction may affect the ingestion, transport or absorption of the study drugs.  Cardiac function and disease are consistent with the following:  Corrected QT interval(QTc)> 470 milliseconds from 3 electrocardiograms (ECGs); Any clinically important abnormalities in rhythm; Any factors that increase the risk of QTc prolongation; Left ventricular ejection fraction (LVEF) <50%. Active human immunodeficiency virus (HIV), syphilis, hepatitis c virus (HCV) or hepatitis b virus (HBV) infection, with the exception of asymptomatic chronic hepatitis b or hepatitis c carriers. Previous history of interstitial lung disease(ILD)#drug-induced ILD or radiation pneumonitis require steroid treatment, or any evidence of clinically active ILD diseases. Previous allogeneic bone marrow transplant. Pregnant or lactating women. Any other disease or medical condition that is unstable or may affect the safety or study compliance. Hypersensitivity to TY-9591 or similar compounds or excipients.