The major objective of this study was to investigate the anti-chronic nonbacterial prostatitis (CNP) mechanism of T. patula by metabolomics and network pharmacology. The study demonstrated that the flavonoids and polysaccharides of T. patula could alleviate prostatitis by improving the level of DHT, reducing the secretion of PSA and TNF-α. Besides, both could enhance Na+/K+-ATPase activity, decrease the O2 consumption, CO2 production, heat production, energy expenditure of rats and promote respiratory exchange ratio of rats. Up to 28 potential biomarkers and 8 key metabolic pathways related to the treatment of CNP were elucidated by the metabolomics analysis, including phenylalanine metabolism, taurine and hypotaurine metabolism, tryptophan metabolism etc. Network pharmacology prediction also reflected the potential mechanism was associated with tryptophan metabolism and energy pathway. Generally, the potential anti-CNP mechanism of flavonoids and polysaccharides of T. patula might be through reducing the expression of inflammation factors, adjusting the level of hormone and regulating the amino acid metabolism, energy metabolism and glucose and lipid metabolism.