A novel pretreatment method, combining H2O2 and nitrogen-rich pyrolysis for biomass was proposed to address the issue of low nitrogen compounds or levoglucosan content in pyrolysis bio-oil. Bio-oil enriched with high content of levoglucosan and nitrogenous compounds was obtained. In this study, the effects of pretreatment conditions (H2O2 solution concentration, pretreatment time, solution pH) and nitrogen-rich ratio on the pyrolysis characteristics of corn stover were investigated. The difficulty of converting different components into nitrogenous compounds was evaluated for the first time. The results reveal that H2O2 pretreatment effectively removed most lignin and ash, leading to a substantial enrichment of cellulose. Notably, carbohydrate content in bio-oil increased by more than 970 %. However, excessive pyrolysis temperature and pH of H2O2 solution can aggravate the decomposition of carbohydrates. The co-pyrolysis of the pretreated corn stover with urea increased the bio-oil yield (up to 56.32 wt%) and the content of nitrogenous compounds (43.16 wt%). The order of ease in converting certain components into nitrogenous compounds is Ketones > Aldehyde > Furans > Phenols > Esters > Alcohols. This study not only clarified the correlation coupling mechanisms between raw material pretreatment conditions and nitrogen-rich ratio with pyrolysis product characteristics. It can also provide guidance for biorefining. Based on the excellent lignin removal effect of the method proposed in this study, it has broad application prospects in the field of biorefinery of lignocellulosic biomass.