Previous studies have shown that heavy aerosol pollution can inhibit the surface ozone generation. More recent studies, however, have revealed that aerosol loading is positively correlated with ozone concentrations in large cities, such as Shanghai, particularly during the summer. Whether the correlation between aerosol pollution and ozone concentrations is positive or negative, it is an issue that needs to be considered by atmospheric scientists. Although the presence of ozone precursors, such as nitrogen oxide (NOx) and volatile organic compounds (VOCs), affect ozone concentrations, the roles of aerosols in the formation of ozone have rarely been investigated. Therefore, an analysis of the effect of aerosols on photochemical ozone generation via a study of the interaction of ozone and its precursors is important. In our research, we found that both aerosol and ozone concentrations were higher in Shanghai under polluted conditions than they were under clean conditions during the summer, but the ozone formation was controlled by VOCs, not by aerosol loading. The decrease in the AOD (SSA) increased (decreased) the surface UV radiation and promoted (inhibited) photochemical ozone production. We also found that the lower the concentration of photochemically active VOCs, the weaker the effect of the AOD on the ozone concentrations. The other results were shown as follows: (1) Aerosol pollution decreased the amount of UV radiation reaching the Earth's surface, but the surface UV radiation increased with increasing aerosol particle scattering; (2) Aerosol pollution inhibited the photolysis of nitrogen dioxide (NO2), while the scattering property of aerosols facilitated this phenomenon; (3) When both the concentration of ozone precursors and the SSA were constant, the ozone concentration decreased, but the attenuation rate increased significantly with an increase in AOD.