CYP105AS1 is a cytochrome P450 from Amycolatopsis orientalis that catalyzes monooxygenation of compactin to 6-epi-pravastatin. For fermentative production of the cholesterol-lowering drug pravastatin, the stereoselectivity of the enzyme needs to be inverted, which has been partially achieved by error-prone PCR mutagenesis and screening. In the current study, we report further optimization of the stereoselectivity by a computationally aided approach. Using the CoupledMoves protocol of Rosetta, a virtual library of mutants was designed to bind compactin in a pro-pravastatin orientation. By examining the frequency of occurrence of beneficial substitutions and rational inspection of their interactions, a small set of eight mutants was predicted to show the desired selectivity and these variants were tested experimentally. The best CYP105AS1 variant gave >99% stereoselective hydroxylation of compactin to pravastatin, with complete elimination of the unwanted 6-epi-pravastatin diastereomer. The enzyme-substrate complexes were also examined by ultrashort molecular dynamics simulations of 50 × 100 ps and 5 × 22 ns, which revealed that the frequency of occurrence of near-attack conformations agreed with the experimentally observed stereoselectivity. These results show that a combination of computational methods and rational inspection could improve CYP105AS1 stereoselectivity beyond what was obtained by directed evolution. Moreover, the work lays out a general in silico framework for specificity engineering of enzymes of known structure.