Macrocyclic compounds are central to the development of new drugs, but preparing them can be challenging because of the energy barrier that must be surmounted in order to bring together and fuse the two ends of an acyclic precursor such as an alkene (also known as an olefin). To this end, the catalytic process known as ring-closing metathesis (RCM) has allowed access to countless biologically active macrocyclic organic molecules, even for large-scale production. Stereoselectivity is often critical in such cases: the potency of a macrocyclic compound can depend on the stereochemistry of its alkene; alternatively, one isomer of the compound can be subjected to stereoselective modification (such as dihydroxylation). Kinetically controlled Z-selective RCM reactions have been reported, but the only available metathesis approach for accessing macrocyclic E-olefins entails selective removal of the Z-component of a stereoisomeric mixture by ethenolysis, sacrificing substantial quantities of material if E/Z ratios are near unity. Use of ethylene can also cause adventitious olefin isomerization-a particularly serious problem when the E-alkene is energetically less favoured. Here, we show that dienes containing an E-alkenyl-B(pinacolato) group, widely used in catalytic cross-coupling, possess the requisite electronic and steric attributes to allow them to be converted stereoselectively to E-macrocyclic alkenes. The reaction is promoted by a molybdenum monoaryloxide pyrrolide complex and affords products at a yield of up to 73 per cent and an E/Z ratio greater than 98/2. We highlight the utility of the approach by preparing recifeiolide (a 12-membered-ring antibiotic) and pacritinib (an 18-membered-ring enzyme inhibitor), the Z-isomer of which is less potent than the E-isomer. Notably, the 18-membered-ring moiety of pacritinib-a potent anti-cancer agent that is in advanced clinical trials for treating lymphoma and myelofibrosis-was prepared by RCM carried out at a substrate concentration 20 times greater than when a ruthenium carbene was used.