The cost-effective, high-performance fabrication of multicolor carbon quantum dots (CQDs) from biomass is critical to its prospective application. Lignin, with its phenylpropane structural unit and abundant functional groups, is a reliable precursor for the formation of high-quality CQDs. Here, CQDs from renewable lignin were successfully prepared via a two-step method, and controllable preparation of CQDs to emit blue, green, yellow, and red fluorescence was achieved by adjusting the N-containing acid dopant. The investigated fluorescence mechanism revealed that the energy bandgap of the lignin-derived CQDs decreased and the emission wavelength redshifted as the graphitization degree and number of C=O surface groups increased. The light absorption region of the Bi7O9I3 photocatalysts modified with blue CQDs to red CQDs gradually broadened in the redshifted direction. In particular, compared with pure Bi7O9I3 (70.9%), the red CQDs-modified Bi7O9I3 (RCQD/BOI) can remove 94.7% of antibiotics within 60 min of light irradiation. The superior photocatalytic activity of RCQD/BOI is attributed to the established internal electric field that accelerates charge transfer and effectively separates the photogenerated e+-h+ inside Bi7O9I3. Furthermore, through radical capture, electron paramagnetic resonance (EPR) experiments validated the photocatalytic mechanism of RCQD/BOI and revealed that h+, O2− and OH are key reactants in the photocatalytic degradation process. This promising and sustainable approach for the synthesis of multicolor lignin-derived CQDs opens the avenue of high-value utilization of biomass resources, green production of CQDs nanomaterials, and efficient development of CQDs-based photocatalysts for wastewater treatment.