The air quality and visibility are strongly influenced by aerosol loading and meteorological conditions. The quantification of their relationships is critical to understanding the physical and chemical processes and forecasting of the polluted events. We investigated and quantified the relationship among PM<sub>2.5</sub> (particulate matter with aerodynamic diameter is 2.5 μm and less) mass concentration, visibility and planetary boundary layer (PBL) height in this study based on the data obtained from four long–lasting haze events and seven fog–haze mixed events from January 2014 to March 2015 in Beijing city. The data were sampled by the state–of–the–art instruments such as Micro Pulse Lidar (model MPL–4B), particulate monitor (model TEOM 1405–DF), ceilometer (model CL31), visibility sensor (model PWD20) and profiling microwave radiometer (PMWR, model 3000A) as well as some conventional meteorological instruments during the field campaign for haze and fog–haze mixed events in northern China. The statistical results show that there was a negative exponential function between the visibility and the PM<sub>2.5</sub> mass concentration for both haze and fog–haze mixed events (with the same <i>R</i><sup>2</sup> of 0.80). However, the fog–haze events caused a more obvious decrease of visibility than that for haze events due to the formation of fog droplets that could induce higher light extinction. The PM<sub>2.5</sub> concentration had inversely linear correlation with PBL height for haze events and negative exponential correlation for fog–haze mixed events, indicating that the PM<sub>2.5</sub> concentration is more sensitive to PBL height in fog–haze mixed events. The visibility had positively linear correlation with the PBL height with the <i>R</i><sup>2</sup> of 0.35 in haze events and positive exponential correlation with the <i>R</i><sup>2</sup> of 0.55 in fog–haze mixed events. We also investigated the physical mechanism responsible for these relationships among visibility, PM<sub>2.5</sub> concentration and PBL height through typical haze and fog–haze mixed event, and found that a double inversion layer formed in both typical events and played critical roles in maintaining and enhancing the long–lasting polluted events. The upper–level stable inversion layer formed by the persistent southwest warm and humid airflow caused the PM<sub>2.5</sub> accumulation and subsequent surface cooling as well as the formation of a weak low–level inversion layer. The formation of low–level inversion layer further enhanced the PM<sub>2.5</sub> accumulation and surface cooling process, and induced a strong descending process of the upper–level inversion layer with warm and humid air, which significantly strengthened the PBL stability and formed a deep stable PBL in the daytime, and in return rapidly increased the PM<sub>2.5</sub> concentration. This positive feedback was particularly strong when the PM<sub>2.5</sub> mass concentration was larger than 150–200 μg m<sup>−3</sup>. Therefore, the formation and subsequent descending processes of the upper–level inversion layer should be an important factor in maintaining and strengthening the long–lasting severe polluted events, which has not been revealed in previous publications. The feedback caused an obvious and more rapid increase of PM<sub>2.5</sub> concentration and a significant deterioration of air quality and visibility in fog–haze mixed events.