Non-Small Cell Lung Cancer (NSCLC) is the most typical kind of lung cancer. Chemotherapy, radiation therapy, and other traditional cancer therapies are ineffective. Advancements in understanding cancer's molecular causes have led to targeted therapies, such as those addressing NTRK gene fusions in NSCLC. Several machine-learning techniques were used in our work, including k-Nearest Neighbors (kNN), Support Vector Machine (SVM), Random Forest (RF), and Naive Bayes (NB). As a result, the RF model outperformed the other studied machine-learning methods, achieving an astonishing 93.12% accuracy for both training as well as testing datasets, and it was employed to screen 9000 chemicals, resulting in the discovery of 65 putative NTRK potential inhibitors. The active sites of NTRK proteins were then docked with these 65 active chemicals. Our findings show that Gancaonin X, 5-hydroxy-2-(4-methoxyphenyl)-8,8-dimethyl-2,3-dihydropyrano[2,3-h]chromen-4-one, (2S)-7-[[(2R)-3,3-dimethyloxiran-2-yl]methoxy]-5-hydroxy-2-phenyl-2,3-dihydrochromen-4-one, (2S)-5-hydroxy-2-(4-methoxyphenyl)-8,8-dimethyl-2,3-dihydropyrano[2,3-h]chromen-4-one, and methyl 2-(methylamino)-5-[(3S)-1,2,3,9-tetrahydropyrrolo[2,1-b]quinazolin-3-yl]benzoate establish strong interactions inside the binding region of NTRK, as a result of which stable complexes are formed. This study employs 100 ns molecular dynamics simulations to investigate the dynamic behavior of phytochemical-NTRK complexes, revealing stable interactions through RMSD, RMSF, Rg, and SASA analyses. The detailed examination of protein-ligand interactions provides crucial atomic-level insights, enhancing our understanding of potential neurotrophic receptor kinase-targeted therapeutic strategies. This highlights their significant ability as NTRK antagonists, giving novel treatment options for NSCLC therapy. To summarize, the application of machine learning in combination with virtual screening in this study not only can discover new NSCLC therapeutics but also highlight new computer approaches in the field of drug discovery.