Chronic inflammation due to islet-residing macrophages plays key roles in the development of type 2 diabetes mellitus. By systematically profiling intra-islet lipid-transmembrane receptor signalling in islet-resident macrophages, we identified endogenous 9(S)-hydroxy-10,12-octadecadienoic acid-G-protein-coupled receptor 132 (GPR132)-Gi signalling as a significant contributor to islet macrophage reprogramming and found that GPR132 deficiency in macrophages reversed metabolic disorders in mice fed a high-fat diet. The cryo-electron microscopy structures of GPR132 bound with two endogenous agonists, N-palmitoylglycine and 9(S)-hydroxy-10,12-octadecadienoic acid, enabled us to rationally design both GPR132 agonists and antagonists with high potency and selectivity through stepwise translational approaches. We ultimately identified a selective GPR132 antagonist, NOX-6-18, that modulates macrophage reprogramming within pancreatic islets, decreases weight gain and enhances glucose metabolism in mice fed a high-fat diet. Our study not only illustrates that intra-islet lipid signalling contributes to islet macrophage reprogramming but also provides a broadly applicable strategy for the identification of important G-protein-coupled receptor targets in pathophysiological processes, followed by the rational design of therapeutic leads for refractory diseases such as diabetes.