Reversible switching of the structural ground state of a solid is a fundamental goal in materials engineering, which has not been achieved in atomically thin layers of van der Waals crystals. This is particularly important for the transition metal dichalcogenides, such as molybdenum disulphide (MoS$_2$), where the higher-energy octahedral polymorphs exhibit a wide range of fascinating properties. Here we show that thermodynamically stable octahedral phase of monolayer MoS$_2$ can be achieved in coexistence with the 1H phase, at temperatures below ∼500 K, by forming a van der Waals hybrid with another layered solid, such as hexagonal boron nitride (hBN) or graphene. Spatial mapping and temperature-dependence of the zone-folded Raman modes reveal that the octahedral phase exists only within the heterostructure region, and exhibits remarkable stability to repeated thermal cycling. A concurrent shift in the out-of-plane A$_{1g}$ vibrational mode of MoS$_2$, and near-absence of the octahedral phase in homo-epitaxial structures, suggest likely role of local lattice relaxation due to incommensurability-driven stress fields. Our experiment establishes van der Waals hetero-epitaxy as a new tool for crystal structure engineering in atomic membranes.