Near-ultraviolet photodetectors (NUV PDs) are widely used in various applications such as autonomous driving, UV radiation monitoring, and medical diagnostics. ZnO is a low-cost, high-performance semiconductor material for UV light detection. However, solution-processed ZnO thin films exhibit poor conductivity, high density of defects and insufficient light absorption, which limits the development and application of ZnO-based NUV PDs. Herein, we have developed a novel, eco-friendly, and efficient method for extracting carbon quantum dots (CQDs) from discarded coffee grounds, named as CCQDs, and successfully integrated them into ZnO nanorods (NRs) for the first time to improve NUV PDs. The CCQDs modified ZnO NRs show a boosting light scattering with an increased haze by 120.0 % in 300–420 nm, and enhanced conductivity enable a lowered dark current and a higher photo current. The resulting NUV PDs exhibits a significant improvement in the ratio of Iphoto/Idark by 3467.3 % and a relatively sizeable normalized detection (D*: 9.81 × 1010 Jones), high linear dynamic range (LDR: 65.32 dB), and low equivalent noise power (NEP: 2.88 × 10−12 W) compared to the intrinsic ZnO NRs device. The outstanding performance can be attributed to the increased light absorption, reduced defects of ZnO NRs after the modification of CCQDs, and the faster electron transfer on the ZnO NRs/CCQDs thin films. This work provides a simple method for developing low-cost, high-performance ZnO-based PDs.