A novel, efficient, and environmentally friendly technology is used in cornstalk cooking, active oxygen (O₂ and H₂O₂) cooking with solid alkali (MgO). After the cooking, the milled wood lignin in the raw material and pulp and the water-soluble and insoluble lignin in the yellow liquor were all characterized by attenuated total reflectance Fourier transform infrared spectroscopy and two-dimensional heteronuclear single-quantum coherence NMR. The results showed that the cooking procedure with solid alkali and active oxygen had a high selectivity for delignification, which could remove 85.5% of the lignin from the raw material. The syringyl (S/S'/S') units could be dissolved preferentially because of their high reactivity, and a novel guaiacyl unit with a carbonyl group (G') was generated in the cooking process. Moreover, during the cooking, the β-O-4' (A/A'/A″) structures as the main side-chain linkages in all the lignins could be partly broken and the β-O-4' (A') with a ring-conjugated structure was readily attacked by oxygen, whereas the H unit and β-5' and β-β' structures were found to stay stable without characteristic reaction.