Over the past two decades, synergistic innovations in imaging technology have resulted in a revolution in which a range of biomedical applications are now benefiting from fluorescence imaging. Specifically, advances in fluorophore chemistry and imaging hardware, and the identification of targetable biomarkers have now positioned intraoperative fluorescence as a highly specific real-time detection modality for surgeons in oncology. In particular, the deeper tissue penetration and limited autofluorescence of near-infrared (NIR) fluorescence imaging improves the translational potential of this modality over visible-light fluorescence imaging. Rapid developments in fluorophores with improved characteristics, detection instrumentation, and targeting strategies led to the clinical testing in the early 2010s of the first targeted NIR fluorophores for intraoperative cancer detection. The foundations for the advances that underline this technology continue to be nurtured by the multidisciplinary collaboration of chemists, biologists, engineers, and clinicians. In this Review, we highlight the latest developments in NIR fluorophores, cancer-targeting strategies, and detection instrumentation for intraoperative cancer detection, and consider the unique challenges associated with their effective application in clinical settings.