Brassinosteroids (BRs) are essential plant steroid hormones that regulate plant growth and development1. The most potent BR, brassinolide, is produced by addition of many oxygen atoms to campesterol by several cytochrome P450 monooxygenases (CYPs). CYP90B1 (also known as DWF4) catalyses the 22(S)-hydroxylation of campesterol and is the first and rate-limiting enzyme at the branch point of the biosynthetic pathway from sterols to BRs2. Here we show the crystal structure of Arabidopsis thaliana CYP90B1 complexed with cholesterol as a substrate. The substrate-binding conformation explains the stereoselective introduction of a hydroxy group at the 22S position, facilitating hydrogen bonding of brassinolide with the BR receptor3-5. We also determined the crystal structures of CYP90B1 complexed with uniconazole6,7 or brassinazole8, which inhibit BR biosynthesis. The two inhibitors are structurally similar; however, their binding conformations are unexpectedly different. The shape and volume of the active site pocket varies depending on which inhibitor or substrate is bound. These crystal structures of plant CYPs that function as membrane-anchored enzymes and exhibit structural plasticity can inform design of novel inhibitors targeting plant membrane-bound CYPs, including those involved in BR biosynthesis, which could then be used as plant growth regulators and agrochemicals.