Abstract. Organosulfates (OS) are ubiquitous in the atmosphere and serve as important tracers for secondary organic aerosols (SOA). Despite intense research over years, the abundance, origin, and formation mechanisms of OS in ambient aerosols, in particular in regions with severe anthropogenic pollution, are still not well understood. In this study, we collected filter samples of ambient fine particulate matter (PM2.5) over four seasons in both 2015/2016 and 2018/2019 at an urban site in Shanghai, China, and comprehensively characterized the OS species in these PM2.5 samples using a liquid chromatography coupled to a high resolution mass spectrometer (UPLC-ESI-QToF-MS). We find that while the concentration of organic aerosol (OA) decreased by 29 % in 2018/2019, compared to that in 2015/2016, the annually averaged concentrations of 35 quantified OS were similar in two years (65.5 ± 77.5 ng m−3 in 2015/2016 versus 59.4 ± 79.7 ng m−3 in 2018/2019), suggesting an increased contribution of SOA to OA in 2018/2019 than in 2015/2016. Isoprene- and monoterpene-derived OS are the two most abundant OS families, on average accounting for 36.3 % and 31.0 % of the quantified OS concentrations, respectively, suggesting an important contribution of biogenic emissions to the production of OS and SOA in Shanghai. The abundance of biogenic OS, particularly those arising from isoprene, exhibited strong seasonality (peaked in summer) but no significant interannual variability. In contrast, anthropogenic OS such as diesel-derived ones had little seasonal variability and declined obviously in 2018/2019 compared with that in 2015/2016. This reflects a significant change in precursor emissions in eastern China in recent years. The C2/C3 OS species that have both biogenic and anthropogenic origins averagely contributed to 19.0 % of the quantified OS, with C2H3O6S−, C3H5O5S−, and C3H5O6S− being the most abundant ones, together accounting for 76 % of C2/C3 OS concentrations. 2-Methyltetrol sulfate (2-MT-OS, C5H11O7S−) and monoterpene-derived C10H16NO7S− were the most abundant OS and nitrooxy-OS in summer, contributing to 31 % and 5 % of the quantified OS, respectively. The substantially larger concentration ratio of 2-MT-OS to 2-methylglyceric acid sulfate (2-MA-OS, C4H7O7S−) in summer (6.8–7.8) than in other seasons (0.31–0.78) implies that low-NOx oxidation pathways played a dominant role in isoprene-derived SOA formation in summer, while high-NOx reaction pathways were more important in other seasons. We further find that the production of OS was largely controlled by the level of Ox (Ox = O3 + NO2), namely, the photochemistry of OS precursors, in particular in summer, though sulfate concentration, aerosol acidity, as well as aerosol liquid water content (ALWC) that could affect the heterogeneous chemistry of reactive intermediates leading to OS formation also played a role. Our study provides valuable insights into the characteristics and mechanisms of OS formation in a typical Chinese megacity and implies that mitigation of Ox pollution can effectively reduce the production of OS and SOA in eastern China.