Previous studies have suggested that air pollutant exposure is related to tuberculosis (TB) risk, but results have not been consistent. This study evaluated the relation between daily air pollutant exposure and TB incidence in Shanghai from 2014 to 2019. Overall, there were four pollutants that were positively related to the risk of new TB cases. After a 5 μg/m3 increase, the maximum lag-specific and cumulative relative risk (RR) of SO2 were 1.081, (95% CI: 1.035–1.129, lag: 3 days) and 1.616 (95% CI: 1.119–2.333, lag: 0–13 days), while for NO2, they were 1.061 (95% CI: 1.015–1.11, lag: 4 days) and 1.8 (95% CI: 1.113–2.91, lag: 0–15 days). As for PM2.5, with a 50 μg/m3 increase, the lag-specific and cumulative RR were 1.064 (95% CI: 1–1.132, lag: 6 days) and 3.101 (95% CI: 1.096–8.777, lag: 0–21 days), while for CO, the lag-specific RR was 1.03 (95% CI: 1.005–1.057, lag: 8 days) and the cumulative RR was 1.436 (95% CI: 1.004–2.053, lag: 0–16 days) with a 100 μg/m3 increase. The associations tended to be stronger in male and elderly patients and differed with seasons. Air pollutant exposure may be a risk factor for TB incidence.