Body size control is fundamental to development and requires proper energy engagement. One of the key energy sensing factors is AMP-activated protein kinase (AMPK), which regulates glucose uptake to ensure ATP production and nutrition supply during development. Here, we identify that the mutation of xgr, a gene encoding an ATPase, results in a reduced body size in Drosophila. Xgr is primarily expressed in the epithelial cells of the Malpighian tubules and the midguts. Loss of xgr leads to the inactivation of the AMPK signaling due to an increased ATP level. Glucose reabsorption in the Malpighian tubules is significantly reduced, as the Glut1 translocation to the plasma membrane is significantly disrupted in the absence of Xgr function. Our results suggest that Xgr function in the Malpighian tubules is essential to systemic glucose supply and energy homeostasis at the organismal level, thereby impacting body size. Our findings provide a mechanistic connection between energy homeostasis and animal size control during development.