The fabrication of optically active heterostructures in the shape of mesostructured thin films is a highly challenging task. It requires an integrated process to allow in one-step incorporating the two-dimensional materials within the mesoporous ordered host without disrupting the pore organization. Hexagonal boron nitride (BN) nanosheets have been successfully introduced into titania mesoporous films using a template-assisted sol–gel synthesis and evaporation-induced self-assembly. Two types of BN sheets have been used, with and without defects, to investigate the role of defects in heterostructure properties. It has been found that the defects increase the ultraviolet radiation A (UVA) absorbance and enhance the photocatalytic response of the film. The BN sheets are optically transparent and do not exhibit any photocatalytic property but contribute to anatase crystallization via heterogeneous nucleation.