Roof-harvested rainwater presents a promising, unconventional, and sustainable water resource for both potable and non-potable uses. However, there is a significant gap in understanding the quality evolution of stored rainwater under varying dissolved oxygen conditions and its suitability for various applications. This study investigated the evolution of rainwater quality under three distinct storage conditions: aerated, open, and sealed. Additionally, the microbial community and metabolic functions were analyzed to systematically evaluate the self-purification performance over long-term storage durations. The results indicate that aerated storage enhances microbial carbon metabolism, leading to a degradation rate of 54.4 %. Sealed and open storage conditions exhibited primary organic matter degradation during the early and late stages, respectively. Roof-rainwater harvesting (RRWH) systems showed limited denitrification activity across all three dissolved oxygen conditions. The maximum accumulation of NO3-N during the storage period reached 5.23 mg/L. In contrast, sealed storage demonstrated robust self-purification performance, evidenced by a comprehensive coefficient of 15.83 calculated by Streeter-Phelps model. These findings provide valuable insights into the mechanisms governing rainwater quality changes under various storage conditions, emphasizing the necessity for developing effective management strategies for the storage and utilization of roof-harvested rainwater.