Mesoporous g-C3N4/Zn–Ti layered double hydroxide (LDH)-laminated van der Waals heterojunction nanosheets were prepared by a facile one-step in situ hydrothermal method. Due to the strong electrostatic interactions between the positively charged Zn–Ti LDH and negatively charged g-C3N4 nanocrystal, a laminated van der Waals heterostructure was successfully formed between Zn–Ti LDH and g-C3N4. The mesoporous g-C3N4/Zn–Ti LDH-laminated van der Waals heterojunction, which had a narrow bandgap of 2.41 eV extended the photoresponse to the visible light region. The obtained heterojunctions showed excellent visible-light-driven photocatalytic performance for the complete removal of ceftriaxone sodium (up to ∼97%) and a high hydrogen production rate (∼161.87 μmol h−1 g−1). This was mainly attributed to the formation of the laminated van der Waals heterojunctions, which favoured charge separation and the absorption of visible light, and the mesoporous structure, which provided more surface active sites. This facile strategy for preparing mesoporous g-C3N4/Zn–Ti LDH-laminated van der Waals heterojunctions offers new insights for the fabrication of high-performance van der Waals heterojunction photocatalytic materials.