Fluorescent carbon quantum dots (CQDs) were synthesized from cucurbit[7]uril (Q[7]) and 2,2-bis(hydroxymethyl)propionic (DMPA) by a hydrothermal method. The Q[7]-DMPA complex was confirmed by X-ray crystallography. The CQDs showed blue fluorescence, photostability, and ionic strength stability. They were used to detect histamine with a low limit of 2.33 × 10-6 M.