Soft and hard templates assisted synthesis mesoporous CuO/g-C3N4 heterostructures for highly enhanced and accelerated Hg(II) photoreduction under visible light.