Carbapenem antibiotics possess a broad spectrum of antibacterial activity and high resistance to hydrolytic inactivation by β-lactamases. Carbapenem synthase (CarC), an iron(II) and 2-(oxo)glutarate-dependent oxygenase, catalyzes the epimerization and desaturation of (3S,5S)-carbapenam to produce (5R)-carbapenem in the last step of the simple carbapenem biosynthesis. Recently, the complete crystal structure of CarC was reported, allowing us to perform accurate quantum mechanics/molecular mechanics (QM/MM) calculations to explore the detailed reaction mechanism. We first analyzed the dioxygen binding site on metal and identified that the Fe IV -oxo species has two potential orientations with either the oxo group trans to His101 or trans to His251. The former is energetically unstable, which can rapidly isomerize into the latter by rotation of the oxo group. Arg279 plays important roles in regulating the dioxygen binding and assisting the isomerization of Fe IV -oxo species. The calculation results clearly support the stepwise C5-epimerization and C2/3-desaturation processes, involving two complete oxidative cycles. The epimerization process converts (3S,5S)-carbapenam to the initial product (3S,5R)-carbapenam, undergoing H5 atom abstraction by Fe IV =O species, inversion of C5-radical and reconstitution of the inverted C5-H bond by Tyr165. In the desaturation process, (3S,5R)-carbapenam rebinds the CarC active site with a new orientation compared to (3S,5S)-carbapenam does in the epimerization. In addition, the desaturation across C2-C3 occurs without involving any active site residue other than the Fe IV =O center. Whereas Tyr165 is not involved in the desaturation reaction, it plays a key role in binding (3S,5R)-carbapenam.(3S,5R)-carbapenam is a substrate superior to its epimer (3S,5S)-carbapenam for CarC to produce (5R)-carbapenem by efficient desaturation. Besides, the substrate hydroxylations compete with the target epimerization and desaturation reactions.