Porous oxygen-doped carbon materials based on the copolymers of a diacetal-type benzoxazine (ACE-a) and melamine with different ratios are prepared by a facile template-free method. The oxygen-rich diacetal structure in ACE-a allowed for a high oxygen content of 66.2% in surface in these porous carbon materials, and the degradation of the melamine at a high temperature gave an ideal pore structure with a specific surface area of 1383.9 m 2 g −1 and a pore capacity of 0.748 cm 3 g −1 . The electrochemical performances are analyzed by Cyclic voltammetry (CV) and Galvanostatic charge-discharge (GCD) tests, and the effects of melamine contents and electrolyte types are also investigated. The results suggested that this material possessed specific capacitance of 430 F g −1 in 0.5 M H 2 SO 4 and 194 F g −1 in 6 M KOH (0.5 A g −1 ), respectively, and showed excellent charge-discharge behavior and magnification characteristic. Moreover, the copolymerization reactions, crosslinking structures, and degradation process of the benzoxazine/melamine copolymers are studied by differential scanning calorimetry (DSC), Fourier transform infrared spectroscopy (FTIR) and thermogravimetric analysis-infrared spectrometry (TGA-IR), respectively. This kind of oxygen-enriched porous carbon material has a good applicative prospect in the field of supercapacitor.