β-Cyclodextrin-grafted citrate was used for the first time as a stabilizer and reducer to prepare silver nanoparticles (AgNPs). The as-synthesized AgNPs were further characterized by UV-vis absorption spectroscopy, powder X-ray diffraction spectroscopy, and transmission electron microscopy. The results show that the presence of riboflavin caused severe aggregation of the nanoparticles, thereby inducing a colour change from yellow to red. 1H NMR further verified the formation of non-inclusion complexes between riboflavin and β-cyclodextrin-grafted citrate. Hydrogen bond was considered the main driving force of the interaction between the riboflavin and external rim of β-cyclodextrin. Based on these observations, the as-synthesized AgNPs were utilized to develop a novel colorimetric sensor for riboflavin detection. This colorimetric probe showed excellent selectivity and high sensitivity for riboflavin with a detection limit of 167nM.