Serpentinite dehydration is important for subduction zone dynamics and water cycling. Field observations suggest that en échelon olivine veins in serpentinite mylonites formed by dehydration during simultaneous shearing of antigorite serpentinite. Here, we test the hypothesis of shear‐driven formation of olivine dehydration veins with a novel two‐dimensional hydro‐mechanical‐chemical numerical model. Our model accounts for the reaction antigorite + brucite = forsterite + water, considering significant solid density changes of approximately 25%. We assume ductile shearing, a decrease of shear viscosity with increasing porosity, and initially homogeneous total and fluid pressures within the serpentinite stability field. Initial perturbations in porosity, and hence viscosity, cause fluid pressure perturbations during simple shearing. Dehydration nucleates where fluid pressure locally drops below the thermodynamic pressure controlling the reaction boundary. During shearing, dehydration veins grow and serpentinite transforms into olivine inside the veins. Simulations show that the ambient pressure and the relation between compaction length and porosity have a major impact on vein formation. Conversely, the orientation of the initial porosity perturbation, the pressure‐insensitive yield stress, the porosity dependence of compaction viscosity, the elastic effects during compaction, and the reaction kinetics have minor impacts on the simulations. We quantify the relative contribution of the rates of solid volume change, solid density change, and reactive mass transfer to the porosity generation. Vein growth is self‐limiting and eventually reaches a steady state. We discuss potential implications for natural olivine veins, slow slip and tremor, transient weakening, anisotropy generation, and formation of shear‐driven high‐porosity bands without a dehydration reaction.