The concerns regarding pharmaceutical waste, particularly expired drugs have prompted the exploration of their alternative applications. This research highlights the potential of repurposing expired pharmaceuticals as eco-friendly corrosion inhibitors for their industrial applications. An expired drug sumatriptan was investigated for its anticorrosive properties on MS in 1 M HCl medium. Electrochemical techniques, including potentiodynamic polarization and electrochemical impedance spectroscopy, were employed to evaluate the inhibition efficiency and complemented by surface characterization studies (SEM, EDAX, CA and AFM). The results demonstrated that sumatriptan acts as an effective mixed-type inhibitor, achieving maximum inhibition efficiencies of 94.51% and 93.85% from PDP and EIS studies respectively for 500 ppm at 318 K. The adsorption of sumatriptan on the metal surface followed the Langmuir isotherm having an R2 value of ∼1, suggesting a physical adsorption behaviour with Δ G° values ranging from −16.286 to −21.518 kJ mol−1. The results demonstrate the effectiveness of sumatriptan as a corrosion inhibitor and the potential of repurposing expired pharmaceuticals as eco-friendly and sustainable alternatives.