Development of highly efficient and sensitive methods for trace detection of pesticides in foods is in great need. In this study, a signal “on–off-on” fluorescent nanosensor was proposed based on gold nanoparticles (AuNPs) and biomass derived nitrogen-doped carbon dots (N-CDs) for accurate qualitation and quantitation of thiram in hawthorn. The water-soluble orange peel-derived N-CDs were obtained through a facile one-step microwave-assisted synthesis strategy. The fluorescence of biomass N-CDs could be effectively quenched by AuNPs through inner filter effect (IFE), and recovered when AuNPs were aggregated. In the presence of thiram, N-CDs specially bound with AuNPs through Au-S bonds, causing the aggregation of AuNPs with a visible color change from red to blue, accompanying with the release of N-CDs and a recovery of fluorescence. The restored fluorescence intensity was relevant with the added amount of thiram in a concentration-dependent manner for reliable quantitation. Under the optimized conditions, the newly-developed fluorescent nanosensor exhibited high selectivity for thiram out of other six interfering pesticides, as well as excellent sensitivity with an ultralow detection limit of 4.7 ng/mL and a wide detection range of 10–200 ng/mL. The practical application of the established nanosensor in the spiked hawthorn samples confirmed satisfactory recoveries of 102.22–107.57% with relative standard deviations (RSDs) lower than 5%. The results indicated the feasibility, practicality and wide application prospect of the proposed fluorescent nanosensor for thiram in foods and other commodities.