GPR119 agonists are being developed to safeguard the function of pancreatic β-cells, especially in the context of non-alcoholic fatty pancreas disease (NAFPD) that is closely associated with β-cell dysfunction. This study aims to employ a drug repurposing strategy to screen GPR119 agonists and explore their potential molecular mechanisms for enhancing β-cell function in the context of NAFPD. MIN6 cells were stimulated with palmitic acid (PA), and a NAFPD model was established in GPR119-/- mice fed with a high-fat diet (HFD). Terazosin, identified through screening, was utilized to assess its impact on enhancing β-cell function via the MST1-Foxo3a pathway and mitophagy. Terazosin selectively activated GPR119, leading to increased cAMP and ATP synthesis, consequently enhancing insulin secretion. Terazosin administration improved high blood glucose, obesity, and impaired pancreatic β-cell function in NAFPD mice. It inhibited the upregulation of MST1-Foxo3a expression in pancreatic tissue and enhanced damaged mitophagy clearance, restoring autophagic flux, and improving mitochondrial quantity and structure in β-cells. Nevertheless, GPR119 deficiency negated the positive impact of terazosin on pancreatic β-cell function in NAFPD mice and abolished its inhibitory effect on the MST1-Foxo3a pathway. Terazosin activates GPR119 on the surface of pancreatic β-cells, enhancing mitophagy and alleviating β-cell dysfunction in the context of NAFPD by suppressing the MST1-Foxo3a signalling pathway. Terazosin could be considered a priority treatment for patients with concomitant NAFPD and hypertension.