Microwave-assisted catalysed rapid pyrolysis of soybean straw to prepare high-value bio-oils rich in indoles achieved value-added use of biomass. The effects of different urea doping ratios, two typical Al-based catalysts (γ-Al2O3, HZSM-5), and different HZSM-5 doping ratios on the preparation of N-rich bio-oils (NCBs) from soybean straw by microwave-assisted pyrolysis were investigated. It was shown that the yield of the liquid product at 40 % urea addition was 39.63 %, in which pyridine compounds were enriched to the extent of 20.86 %. On this basis, the effects of γ-Al2O3 and HZSM-5 on N-containing compounds (NCCs) in bio-oil were analyzed in detail. The yield of NCCs increased significantly with the addition of HZSM-5. The best parameter combinations were obtained through orthogonal experiments: urea addition of 50 %, HZSM-5 catalyst type, and catalyst doping ratio of 200 %. At this point, the bio-oil yield reached 29.575 wt%. Among them, indole yield reached 41.66 wt% and exhibited high selectivity of 68.92 % in NCCs. The formation mechanism of indoles during microwave-assisted N-rich pyrolysis was further investigated on the basis of experimental studies. In addition, the inhibitory effect of the HZSM-5 catalyst on the formation of pyridine compounds during pyrolysis process and the enhancement mechanism of the formation of indole compounds were deeply investigated. This provided a green pathway for the preparation of indoles by microwave-assisted fast pyrolysis directional catalytic conversion of biomass.