Profiting from a series of anti-tuberculosis programs in China, the number of tuberculosis (TB) cases has diminished dramatically in the past decades. However, long-term spatial-temporal variations, regional trends of prevalence, and mechanisms of determinant factors remain unclear. Age-period-cohort analysis and Bayesian space-time hierarchy statistics were conducted to identify high-risk populations and areas in mainland China, and the geographical detector model was used to evaluate the important drivers of the disease. The prevalence of pulmonary TB has declined from 73.3/100,000 in 2004 to 55.45/100,000 in 2018. A bimodal distribution was found in age groups, and the birth cohorts before 1978 had relative higher risk. The high-risk areas were mainly distributed in western China and south-central China, and several provinces in eastern China showed a potential increasing trend, including Beijing, Shanghai, Liaoning, and Guangdong province. The index of night light (Q = 0.46), the population density (Q = 0.41), PM10 (Q = 0.38), urbanization rate (Q = 0.32), and PM 2.5 (Q = 0.31) contributed substantially to the spatial distribution of pulmonary tuberculosis. The identifications of epidemic patterns, high-risk areas and influence factors would help design targeted intervention measures to achieve milestones of the end TB strategy.