The fabrication of oriented, crystalline films of metal–organic frameworks (MOFs) is a critical step toward their application to advanced technologies such as optics, microelectronics, microfluidics and sensing. However, the direct synthesis of MOF films with controlled crystalline orientation remains a significant challenge. Here we report a one-step approach, carried out under mild conditions, that exploits heteroepitaxial growth for the rapid fabrication of oriented polycrystalline MOF films on the centimetre scale. Our methodology employs crystalline copper hydroxide as a substrate and yields MOF films with oriented pore channels on scales that primarily depend on the dimensions of the substrate. To demonstrate that an anisotropic crystalline morphology can translate to a functional property, we assembled a centimetre-scale MOF film in the presence of a dye and showed that the optical response could be switched ‘ON’ or ‘OFF’ by simply rotating the film.