Type 2 diabetes mellitus (T2DM) is a chronic metabolic disease with complicated pathogenesis and targeting gluconeogenesis inhibition is a promising strategy for anti-diabetic drug discovery. G protein-coupled receptors (GPCRs) are classified as distinct families by heterotrimeric G proteins, primarily including Gαs, Gαi and Gαq. Gαs-coupled GPCRs function potently in the regulation of hepatic gluconeogenesis by activating cyclic adenosine monophosphate (cAMP)/protein kinase A (PKA) pathway and Gαi-coupled GPCRs exhibit inhibitory effect on adenylyl cyclase and reduce intracellular cAMP level. However, little is known about the regulation of Gαq-coupled GPCRs in hepatic gluconeogenesis. Here, small-molecule 2-(2,4-dimethoxy-3-methylphenyl)-7-(thiophen-2-yl)-9-(trifluoromethyl)-2,3-dihydropyrido[3′,2′:4,5]thieno[3,2-d]pyrimidin-4(1H)-one (DMT) was determined to suppress hepatic glucose production and reduce mRNA levels of gluconeogenic genes. Treatment of DMT in db/db mice decreased fasting blood glucose and hemoglobin A1C (HbA1c) levels, while improved glucose tolerance and pyruvate tolerance. Mechanism study demonstrated that DMT-inhibited gluconeogenesis by regulating the Gαq/phospholipase C (PLC)/inositol-1,4,5-triphosphate receptor (IP3R)-mediated calcium (Ca2+)/calmodulin (CaM)/phosphatidylinositol-4,5-bisphosphate 3-kinase (PI3K)/protein kinase B (AKT)/forkhead box protein O1 (FOXO1) signaling pathway. To our knowledge, DMT might be the first reported small molecule able to suppress hepatic gluconeogenesis by regulating Gαq signaling, and our current work has also highlighted the potential of DMT in the treatment of T2DM.