OleP is a bacterial cytochrome P450 involved in oleandomycin biosynthesis as it catalyzes regioselective epoxidation on macrolide intermediates. OleP has recently been reported to convert lithocholic acid (LCA) into murideoxycholic acid through a highly regioselective reaction and to unspecifically hydroxylate testosterone (TES). Since LCA and TES mainly differ by the substituent group at the C17, here we used X-ray crystallography, equilibrium binding assays, and molecular dynamics simulations to investigate the molecular basis of the diverse reactivity observed with the two steroids. We found that the differences in the structure of TES and LCA affect the capability of these molecules to directly form hydrogen bonds with N-terminal residues of OleP internal helix I. The establishment of these contacts, by promoting the bending of helix I, fosters an efficient trigger of the open-to-closed structural transition that occurs upon substrate binding to OleP and contributes to the selectivity of the subsequent monooxygenation reaction.