Purpose: Aiming at complete excision of cholesteatoma during trympanomastoidectomy and therefore reducing the risk of recurrence, intraoperative imaging techniques are required to assist the visualization of cholesteatoma residue. Galectin-7 has been demonstrated to be a biomarker for cholesteatoma matrix and used for intraoperatively identifying the excision margins. Methods: A galectin-7-targeted DNA-aptamer library was generated for labeling the cholesteatoma matrix using cell-systematic evolution of ligands by an exponential enrichment technique. The binding characteristics of the identified aptamers were analyzed, and structure optimization of the identified aptamers was carried out both in silico and in vitro. Findings: A fluorophore-labeled structure-optimized DNA fragment was commercially synthesized as a non-invasive aptamer-based probe for intraoperative lesion detection. Using galectin-7-aptamer-guided molecular imaging, the excision margins of cholesteatoma matrix and surrounding normal tissue were successfully achieved within 15–20 min. Conclusions: Galectin-7-targeted aptamers could benefit molecular imaging-guided surgical treatment, which would enable clinicians to not only intraoperatively detect the locations of cholesteatoma matrix in the middle ear, but also assess the postoperative response of the expression profile to therapy. It is highly expected that further efforts for rational design and development should be directed towards the development of clinically translatable aptamer-based imaging agents.