Theranostic agents should ideally be renally cleared and biodegradable. Here, we report the synthesis, characterization and theranostic applications of fluorescent ultrasmall gold quantum clusters that are stabilized by the milk metalloprotein alpha-lactalbumin. We synthesized three types of these nanoprobes that together display fluorescence across the visible and near-infrared spectra when excited at a single wavelength through optical colour coding. In live tumour-bearing mice, the near-infrared nanoprobe generates contrast for fluorescence, X-ray computed tomography and magnetic resonance imaging, and exhibits long circulation times, low accumulation in the reticuloendothelial system, sustained tumour retention, insignificant toxicity and renal clearance. An intravenously administrated near-infrared nanoprobe with a large Stokes shift facilitated the detection and image-guided resection of breast tumours in vivo using a smartphone with modified optics. Moreover, the partially unfolded structure of alpha-lactalbumin in the nanoprobe helps with the formation of an anti-cancer lipoprotein complex with oleic acid that triggers the inhibition of the MAPK and PI3K–AKT pathways, immunogenic cell death and the recruitment of infiltrating macrophages. The biodegradability and safety profile of the nanoprobes make them suitable for the systemic detection and localized treatment of cancer.