The preparation of cellular metabolomics samples and how to achieve comprehensive coverage of different polar metabolites in cell samples in the analysis pose a challenge for cellular metabolomics. In this study, we optimized a metabolomics protocol based on ultra-high-performance liquid chromatography high-resolution mass spectrometry (UPLC/HRMS) for theextraction and detection of metabolites in A549 cells and exploration of the intervention effect of Qi-Yu-San-Long decoction (QYSLD) on A549 cells. The results indicate that the lowest level of ATP leakage was observed when A549 cells were quenched under liquid nitrogen. MeOH/chloroform/H2O (1:2:1) extraction yielded more chromatographic peaks and excellent reproducibility, and the relative extraction efficiency of most target metabolites was also high. And we optimized thechromatographic separation conditions in both HILIC and RPLC modes, enabling comprehensive detection and analysis of metabolites with varying polarities. Then, we applied the optimized method to UPLC-Q-TOF/MS-based metabolomics of A549 cells to study the mechanism of QYSLD intervention in non-small cell lung cancer (NSCLC). The CCK-8, EdU staining, and cell cycle assay showed that QYSLD inhibited the proliferation of A549 cells by interfering with the cell cycle and blocking them in theG1 phase. A total of 36 differential metabolites associated with the antitumor effects of QYSLD on NSCLC were identified, mainly involving nicotinate and nicotinamide metabolism, sphingolipid metabolism, and glycerophospholipid metabolism. And western blotting confirmed that thechange in 1-methylnicotinamide levels after QYSLD intervention was associated with theinhibition of nicotinamide N-methyltransferase expression in A549 cells.