The host–guest inclusion complex of cucurbit[8]uril (Q[8]) and ofloxacin (OFLX) has been prepared and characterised by means of 1H NMR spectroscopy, MALDI-TOF mass spectrometry, isothermal titration calorimetry (ITC), fluorescence spectroscopy, and UV-vis absorption spectroscopy. The findings demonstrated that a host–guest inclusion complex could be formed through an encapsulation of the methylmorpholine and piperazine rings in OFLX. ITC results indicated that the formation of this inclusion complex (1 : 1 molar ratio) was primarily dependent on enthalpy and entropy changes. In addition, the release of OFLX from the inclusion complex was increased under acidic conditions. The host–guest inclusion complex of cucurbit[8]uril (Q[8]) and ofloxacin (OFLX) can be formed through an encapsulation of methylmorpholine and the piperazine ring in OFLX. Moreover, the controlled release of OFLX from the Q[8]–OFLX inclusion complex was also investigated at pH 6.8 and 1.2. [ABSTRACT FROM AUTHOR]