The bacterial CYP105 family is involved in secondary metabolite biosynthetic pathways and plays essential roles in the biotransformation of xenobiotics. This study investigates the newly identified H2O2-mediated CYP105D18 from Streptomyces laurentii as the first bacterial CYP for N-oxidation. The catalytic efficiency of CYP105D18 for papaverine N-oxidation was 1.43 s−1 µM−1. The heme oxidation rate (k) was low (<0.3 min−1) in the presence of 200 mM H2O2. This high H2O2 tolerance capacity of CYP105D18 led to higher turnover prior to heme oxidation. Additionally, the high-resolution papaverine complexed structure and substrate-free structure of CYP105D18 were determined. Structural analysis and activity assay results revealed that CYP105D18 had a strong substrate preference for papaverine because of its bendable structure. These findings establish a basis for biotechnological applications of CYP105D18 in the pharmaceutical and medicinal industries.