Tropomyosin receptor kinases (TrkA, TrkB, and TrkC) are attractive therapeutic targets for multiple cancers. Two first-generation small-molecule Trks inhibitors, larotrectinib and entrectinib, have just been approved to use clinically. However, the drug-resistance mutations of Trks have already emerged, which calls for new-generation Trks inhibitors. Herein, we report the structural optimization and structure–activity relationship studies of 6,6-dimethyl-4-(phenylamino)-6H-pyrimido[5,4-b][1,4]oxazin-7(8H)-one derivatives as a new class of pan-Trk inhibitors. The prioritized compound 11gexhibited low nanomolar IC50values against TrkA, TrkB, and TrkC and various drug-resistant mutants. It also showed good kinase selectivity. 11gdisplayed excellent in vitroantitumor activity and strongly suppressed Trk-mediated signaling pathways in intact cells. In in vivostudies, compound 11gexhibited good antitumor activity in BaF3-TEL-TrkA and BaF3-TEL-TrkCG623Rallograft mouse models without exhibiting apparent toxicity. Collectively, 11gcould be a promising lead compound for drug discovery targeting Trks and deserves further investigation.