β-Cyclodextrin-CuInS2 QDs applied as an ideal near-infrared fluorescence probe. The addition of aptamer into β-CD-CuInS2 QDs provided a new thought of analysis. ATP in real samples were detected with satisfactory results. Encapsulating small molecules of CDs showed great potential to other substances.