The impact of thermally driven mountain-valley breezes (MVB) on the atmospheric environment remains poorly understood, especially in ozone (O3)-polluted regions with complex underlying topography. To address this knowledge gap, we focused on the western Sichuan Basin (SCB), situated immediately east of the Tibetan Plateau (TP), which is considered susceptible to MVB coupled with severe O3 pollution in southwest China. We revealed the MVB driving diurnal O3 variations and meteorological mechanisms using surface observations and ERA5 reanalysis data. Local MVB days accounted for up to 47% of cases in the summers of 2015–2022. Driven by the MVB, the near-surface O3 concentrations increased by 8.8%, with 12.7% and 50.0% deterioration in the O3 light and moderate exceedance rates, respectively, on the western SCB edge. The daytime upslope valley breeze with 20% higher wind speed drove the westward transport of rich O3 and precursors from the upwind-polluted inner SCB towards its western edge, and the O3 photochemical production, followed by intensifying solar radiation and air temperature, gave rise to 14.8% of surface O3 concentrations over the western SCB edge. The nighttime downward mountain breeze with a 20% increase in wind speed could transport the rich O3 in the mountainous area to the basin edge, causing O3 levels to increase by 2.8%. In summary, we quantitatively assessed the impacts of MVB on changes in O3 concentrations and air quality along with its meteorological mechanisms, facilitating a comprehensive understanding of meteorological drivers in the atmospheric environment.