Volatile organic compounds (VOCs) are crucial precursors in the formation of ozone (O3). The sources of pollution are complex and significantly impact O3 generation. Long-term exposure to high-concentration O3 environments causes serious damage to organisms. High-altitude areas experience continuous high temperatures and strong solar radiation, which can easily produce O3 through photochemical reactions, making these areas prone to frequent air pollution. This study utilizes the National Positioning Station of the Yinchuan Urban Ecosystem in Ningxia to conduct field synchronous observations, gathering data on VOCs, meteorological variables, and O3. By employing machine learning algorithms, we examined the seasonal distribution characteristics of VOCs, their pollution sources, and their impact on O3. The results show that the seasonal distribution of VOCs areas is low in spring and autumn and high in summer and winter. The components with higher volume fraction contribution are m-tolualdehyde in spring and summer, ethane in autumn, and acetylene in winter. The main emission sources of VOCs pollution are hydrocarbon volatile emission in spring and winter, solvent volatilization emission in summer, and industrial sources in autumn. VOCs have a negative effect on O3, with a greater impact in winter and spring, evidenced by standardized effect values of −0.26 and −0.24. The key components affecting O3 in VOCs vary by season. Aromatic hydrocarbons are the key components in spring and winter, with contribution rates of 22 % and 21.3 %. Alkenes are the key components in summer and autumn (24.5 % and 26.8 %). Among meteorological variables, temperature is the key factor affecting O3, while wind speed is the key factor affecting O3 only in winter. This study aims to clarify the sources of VOCs pollution in different seasons and their impact on O3, providing a theoretical basis and technical support for the prevention and control of VOCs and O3 pollution in high-altitude areas.