Air pollution has a serious impact on the spread of respiratory infectious diseases. However, the concentration of air pollution is not the same in different places. In order to characterize the spatial heterogeneity and the diffusion of pollutants, this paper proposes a spatial heterogeneity model, where the transmission rate is closely related to air pollution. The dynamics are established in terms of the basic reproduction number R0: if R0≤1, the disease-free equilibrium is globally asymptotically stable; if R0>1, there exists at least one endemic equilibrium and the disease is uniformly persistent. Our findings suggest that spatial heterogeneity, increased pollutants emission, and limited movement of infected individuals will all contribute to the spread of the respiratory infectious diseases. Subsequently, the corresponding strategies are introduced into the model to control the prevalence of the diseases. Under the minimization of the objective function, the necessary condition for the optimal control is acquired with the help of Pontryagin’s maximum principle. Numerical simulations are applied to validate the theoretical results of threshold dynamics and to demonstrate the influences of inflow and clearance rates of pollutants on threshold dynamics and optimal control.