Solasonine, as a major biological component of Solanum nigrum L., has demonstrated anticancer effects against several malignancies. However, little is understood regarding its biological target and mechanism in non-small cell lung cancer (NSCLC). We conducted an analysis on transcriptomic data to identify differentially expressed genes (DEGs), and employed an artificial intelligence (AI) strategy to predict the target protein for solasonine. Subsequently, genetic dependency analysis and molecular docking were performed, with Acetylcholinesterase (ACHE) selected as a pivotal marker for solasonine. We then employed a range of bioinformatic approaches to explore the relationship between ACHE and solasonine. Furthermore, we investigated the impact of solasonine on A549 cells, a human lung cancer cell line. Cell inhibition of A549 cells following solasonine treatment was analyzed using the CCK8 assay. Additionally, we assessed the protein expression of ACHE, as well as markers associated with apoptosis and inflammation, using western blotting. To investigate their functions, we employed a plasmid-based ACHE overexpression system. Finally, we performed dynamics simulations to simulate the interaction mode between solasonine and ACHE. The results of the genetic dependency analysis revealed that ACHE could be identified as the pivotal target with the highest docking affinity. The cell experiments yielded significant findings, as evidenced by the negative regulatory effect of solasonine treatment on tumor cells, as demonstrated by the CCK8 assay. Western blotting analysis revealed that solasonine treatment resulted in the downregulation of the Bcl-2/Bax ratio and upregulation of cleaved caspase-3 protein expression levels. Moreover, we observed that ACHE overexpression promoted the expression of the Bcl-2/Bax ratio and decreased cleaved caspase-3 expression in the OE-ACHE group. Notably, solasonine treatment rescued the Bcl-2/Bax ratio and cleaved caspase-3 expression in OE-ACHE cells compared to OE-ACHE cells without solasonine treatment, suggesting that solasonine induces apoptosis. Besides, solasonine exhibited its anti-inflammatory effects by inhibiting P38 MAPK. This was supported by the decline in protein levels of IL-1β and TNF-α, as well as the phosphorylated forms of JNK and P38 MAPK. The results from the molecular docking and dynamics simulations further confirmed the potent binding affinity and effective inhibitory action between solasonine and ACHE. The findings of the current investigation show that solasonine exerts its pro-apoptosis and anti-inflammatory effects by suppressing the expression of ACHE.