This research focused on the effect of calcium peroxide (CaO2) addition on anaerobic digestion (AD) of corn straw. It was found that the CaO2 dose of 0.032–0.256 g·g−1 TVS (total VS of substrate and inoculum) had positive effect on the AD of corn straw by improving methane yield and content in biogas. Maximum methane yield was achieved at the CaO2 dose of 0.032 g·g−1 TVS, which was 241.6 mL·g−1 VSS (VS of substrate) and 11% higher than that of the control. Methane content in biogas also increased according to the in situ immobilization of CO2 by Ca(OH)2 that produced via the reaction of CaO2 with water (XRD analysis results). Microbial community structure was significantly affected by CaO2 addition. The variation of bacterial community structure led to higher hydrolysis rate, and the variation of archaea community structure ensured the proceeding of methanogenesis process. The use of CaO2 could be a cost-effective method to improve methane production of corn straw because it avoids harsh condition and high cost (e.g., chemical and energy inputs) associated with conventional chemical treatment techniques. The digestate from the AD with the addition of CaO2 can contain high CaCO3 content, making it a potential soil amendment for acidic soil.