g-C3N4/WO3 heterojunction composites were synthesized via an in-situ method by thermal polymerizing the mixture of dual precursors (urea and thiourea with molar ratio of 3:1) and different amount of tungstic acid. The as-synthesized g-C3N4/WO3 composites, with lamellar and rod-like nano-porous structure, were mainly composed of g-C3N4 and monoclinic WO3, in which the crystal size of WO3 was about 5–10 nm. The specific surface area of the composite increased gradually with the tungstic acid dosage and reached 79.41 m2/g when the addition amount of tungstic acid was 1 wt%. The in-situ construction of g-C3N4/WO3 heterojunction contributed to the reduction of band gap, improvement of the visible response range as well as the acceleration of the separation and migration of the photogenerated carriers. As the dosage of tungstic acid increased, the photocatalytic degradation performance of g-C3N4/WO3 composite towards tetracycline improved gradually and achieved the optimum when the addition amount of tungstic acid was 0.1 wt% (CN/WO3-10). CN/WO3-10 (0.05g) degraded 83 % of tetracycline molecules (100 mL, 20 mg/L) after photocatalysis for 100 min, whose degradation rate constant was 10.1 and 1.48 times that of pure WO3 and g-C3N4, respectively. Moreover, g-C3N4/WO3 composite exhibited excellent stability and reusability for the photocatalytic degrading tetracycline. This work provides a facile and practicable approach for the preparation of g-C3N4/WO3 composite.