NiFe-LDH/g-C3N4 (LDH/CN) heterostructures with different amounts of NiFe-LDH (LDH) were prepared by a hydrothermal method and characterized using different experimental techniques. Their photocatalytic properties were investigated using the degradation of tetracycline hydrochloride (TC) and the production of hydrogen from water splitting. Experimental results showed that the hydrogen production rate (780.5 μmol g−1 h−1) was 2.29 times that of pristine CN, and the TC removal rate (76.3%) of 1.8LDH/CN was 3.71 times that of CN. According to the detailed study of the structural, optical, and photoelectrochemical properties, a type II charge transfer mechanism was proposed to explain the improved photocatalytic performance of LDH/CN. [ABSTRACT FROM AUTHOR]