SummaryThis study examined the impact of CO2 on the quality of onions stored at 23 °C for 6 weeks, focussing on bioactive compounds, antioxidant capacity, individual anthocyanins, flavonoids and anthocyanin biosynthesis during the storage period. The findings revealed that a 20% CO2 treatment was markedly more effective than the control in maintaining higher levels of phenolics, flavonoids, flavanols and anthocyanins. Moreover, the 20% CO2 treatment preserved significantly higher quantities of individual anthocyanins and flavonoids compared to the control. Throughout storage, the 20% CO2 treatment significantly boosted the activity of enzymes related to anthocyanin biosynthesis and sucrose metabolism relative to the control groups. In summary, the innovation of this study lies in the use of CO2 to maximise anthocyanin and flavonoid content in stored onions, which are usually diminished by extended storage at room temperature. This method could help extend the shelf life of onions while preserving their quality attributes.