The search for low-cost, earth-abundant and environmentally friendly photocatalysts that can efficiently function over the entire UV–vis–NIR spectrum remains one of the most pressing challenges in the photocatalytic elimination of pollutants from water. Herein, we accurately designed and fabricated a direct Z-scheme carbon nanodots/WO3 nanorods composite (CDots/WO3) with highly enhanced photo-response and broad-spectrum photocatalytic activity. Under ultraviolet, visible, near-infrared (UV, Vis, NIR) irradiation, respectively, the removal efficiencies of rhodamine B (RhB) always decreased in the order CDots/WO3 (97.1, 99.1, 61.2%)>prepared WO3 nanorods (66.6, 69.1, 22.4%)>commercial WO3 nanoparticles (22.1, 11.6, ∼0%). Additionally, reaction rate constants of 0.4030 and 0.2889h−1 were achieved by the CDots/WO3 nanocomposites when photo-oxidizing tetracycline hydrochloride (TCH) and phenol, respectively, both of which were ∼2.9 times higher than those for WO3 nanorods. This excellent photocatalytic performance was ascribed to synergistic effects, including the highly dispersed carbon nanodots on the surface of the WO3 nanorods and efficient charge separation induced by the heterostructure formed between carbon nanodots and WO3 nanorods. Accordingly, a mechanism was proposed to account for the photocatalytic reaction process. The prepared catalyst showed no obvious change in its photocatalytic performance or other chemical properties after 5 cycles of use. Therefore, the carbon nanodots/WO3 nanocomposites may represent a new strategy for the full-spectrum utilization of solar light, providing an invaluable methodology for the remediation of current water-pollution issues.