A facile and efficient WO3/g-C3N4 composite photocatalyst was developed by an in situ raw material decomposition method. The photocatalyst was synthesized by direct heating low-cost ammonium tungstate and melamine together at the same time. The characterization and photocatalytic performance of the WO3/g-C3N4 chemical composite samples were compared with those from mechanical mixing. The characterization includes X-ray diffraction (XRD), transmission electron microscopy (TEM), X-ray photoelectron spectroscopy (XPS), UV-vis diffuse reflectance spectroscopy (DRS), Fourier transform infrared spectra (FT-IR), etc. The composite formed by the chemical method exhibited obviously better photocatalytic activity than the mechanical mixing sample under visible light irradiation. The possible mechanism for the enhanced catalytic efficiency may be due to the synergistic effect between the WO3 and g-C3N4 tighter interface and the improved optical absorption in visible region.