The antidiabetic activity of the novel Buckwheat protein-derived peptide (Ala-Phe-Tyr-Arg-Trp, AFYRW) and its associated protein glycosylation have been verified. Our preliminary study demonstrates the potential of AFYRW as a therapeutic agent for diabetes, but the mechanism needs further investigation. Given the vital role of O-linked N-acetylglucosamine transferase (OGT) in diabetes mellitus and insulin resistance (IR), we focused on the underlying molecular mechanisms of them in ameliorating IR. We found AFYRW protects against hyperglycemia in diabetic mice and improves glucose metabolism in an IR cell model. Mechanistically, we demonstrated that AFYRW decreases glutamine-fructose-6-phosphate amidotransferase (GFAT) expression via X-box binding protein 1 (XBP1) in the hexosamine biosynthesis pathway (HBP), consequently decreasing OGT and stimulating the SIRT1/PGC1α pathway. Of note, the overlapping roles of increased SIRT1 and decreased OGT caused by AFYRW ameliorated IR. The data presented here show that AFYRW contributes to metabolism by directly controlling glucose homeostasis. Taken together, our study unveils that AFYRW protects against both insulin resistance and diabetes mellitus-induced hyperglycemia through OGT to regulate the SIRT1/PGC1α pathway, which provides a mechanistic basis for novel AFYRW to be a potential therapeutic agent.