A complexation of non-fluorescent phenformin hydrochloride (PFH) with cucurbit [7]uril (CB [7]) in aqueous solution was investigated using the fluorescent probe of palmatine (PAL) coupled with CB [7]. The fluorescent probe of CB [7]–PAL exhibited strong fluorescence in aqueous solution, which was quenched gradually with the increase of PFH. This effect is observed because when PFH was added to the host–guest system of CB [7]–PAL, PFH and PAL competed to occupy the CB [7] cavity. Portions of the PAL molecule were expelled from the CB [7] cavity owing to the introduction of PFH. Based on the significant quenching of the supramolecular complex fluorescence intensity, a fluorescence method of high sensitivity and selectivity was developed to determine PFH with good precision and accuracy for the first time. The linear range of the method was 0.005–1.9μgmL−1 with a detection limit of 0.003μgmL−1. In this work, association constants (K) of PFH with CB [7] were also determined. KCB [7]–PFH=(2.52±0.05)×105Lmol−1. The ability of PFH to bind with CB [7] is stronger than that of PAL. The results of a density functional theory calculation authenticated that the moiety of PFH was embedded in the hydrophobic cavity of CB [7] tightly, and the nitrogen atom is located in the vicinity of a carbonyl-laced portal in the energy-minimized structure. The molecular modelling of the interaction between PFH and CB [7] was also confirmed by 1H NMR spectra (Bruker 600MHz).