A unique and efficient fluorescent sensor was developed by doping carbon quantum dots (CQDs) with La(III) ions by microwave treatment. The La-CQDs exhibit an average particle size of 4.8 nm, a quantum yield of 16 % and blue fluorescence emission when excited at 360 nm. Furthermore, the La-CQDs were successfully incorporated into zirconium oxide nanoparticles (La-CQD-ZrO2) and designed as a superior photocatalyst for the degradation of refractory pollutants. Both the sensor and photocatalyst were characterized by Fourier transform infrared (FT-IR) spectroscopy, X-ray photoelectron spectroscopy (XPS), transmission electron microscopy (TEM), X-ray diffraction (XRD), Field emission scanning electron microscopy (FE-SEM), Raman analysis, ultraviolet–visible (UV–Vis) spectroscopy, Photoluminescence (PL) spectroscopy, zeta potential analysis, dynamic light scattering (DLS), cyclic voltammetry (CV), differential pulse voltammetry (DPV), and amperometry analysis. As a PL-based sensor, the La-CQDs displayed outstanding selectivity towards toxic chemical aniline with a limit of detection (LOD) of 10 nM within the linear range 0–2 μM. The excellent results obtained in real sample analysis promise the use of La-CQDs as an aniline sensor in industrial-level applications. The photocatalytic performance of La-CQD-ZrO2 was superior to that of pure ZrO2 and CQD-ZrO2 with more than 90 % degradation efficiency towards rhodamine B (Rh B), sunset yellow (SY), methyl orange (MO), 2,4-dichloro phenoxy acetic acid (2,4-D), and cefalexin. The synthesized composite showed excellent promise as a quick and affordable solution for removing industrial dye from wastewater.