Metformin is the most commonly prescribed antidiabetes drug, yet its precise mechanism of action remains controversial. Previous studies have suggested that metformin acts peripherally by reducing hepatic glucose output and altering gut functions. Here, we report a neural mechanism via the small guanosine triphosphatase Ras-related protein 1 (Rap1). Mice with forebrain-specific Rap1 knockout exhibited resistance to the antidiabetic effects of low-dose metformin while remaining sensitive to other antidiabetic agents. Centrally administered metformin inhibited brain Rap1 and reduced hyperglycemia. Conversely, forced activation of brain Rap1 increased glycemia and abolished the glycemic effect of metformin. Metformin activated a specific subset of neurons in the ventromedial hypothalamic nucleus (VMH) that requires Rap1. Both loss-of-function and gain-of-function studies suggest that VMH Rap1 is indispensable for the antidiabetic effects of metformin. These findings highlight the VMH Rap1 pathway as a critical mediator of metformin action.