In order to produce a photocatalyst with increased visible photocatalytic ability, MIL-125 and melamine were selected as raw materials to prepare Z-scheme g-C3N4/TiO2 heterojunction photocatalyst using a simple calcination method. TEM, HRTEM, XRD, FTIR, EDS, and UV–vis absorption spectra were employed to investigate the prepared specimens. The visible-light catalytic property was examined via the degradation of methylene blue (MB). The recombination and separation activity of electrons and holes (h+/e−) were explored by the transient photocurrent response (TPR) and PL spectra. In contrast with plain TiO2 and g-C3N4, the g-C3N4/TiO2 photocatalyst exhibited increased photocatalytic activities when exposed to visible-light irradiation. With the addition of g-C3N4 at 8 wt%, the Z-scheme g-C3N4/TiO2 heterojunction performed best in the photocatalytic test toward MB dye at a degradation rate of 97.7%. Under visible-light irradiation, the Z-scheme heterojunction between g-C3N4 and TiO2 enables the high-efficient segregation of photogenic electrons and holes (h+/e−), leading to the increased photocatalytic ability. Meanwhile, the large specific surface area of the composite photocatalyst is conducive to the adsorption of the contaminant on the catalyst surface, which has an important effect on the catalytic reaction.