Contra-posing panel data on the incidence of pulmonary tuberculosis (PTB) at the provincial level in China through the years of 2004–2021 and introducing a geographically and temporally weighted regression (GTWR) model were used to explore the effect of various factors on the incidence of PTB from the perspective of spatial heterogeneity. The principal component analysis (PCA) was used to extract the main information from twenty-two indexes under six macro-factors. The main influencing factors were determined by the Spearman correlation and multi-collinearity tests. After fitting different models, the GTWR model was used to analyse and obtain the distribution changes of regression coefficients. Six macro-factors and incidence of PTB were both correlated, and there was no collinearity between the variables. The fitting effect of the GTWR model was better than ordinary least-squares (OLS) and geographically weighted regression (GWR) models. The incidence of PTB in China was mainly affected by six macro-factors, namely medicine and health, transportation, environment, economy, disease, and educational quality. The influence degree showed an unbalanced trend in the spatial and temporal distribution.