Body size and shape fundamentally determine organismal energy requirements by modulating heat and mass exchange with the environment and the costs of locomotion, thermoregulation, and maintenance. Ecologists have long used the physical linkage between morphology and energy balance to explain why the body size and shape of many organisms vary across climatic gradients, e.g., why larger endotherms are more common in colder regions. However, few modeling exercises have aimed at investigating this link from first principles. Body size evolution in bats contrasts with the patterns observed in other endotherms, probably because physical constraints on flight limit morphological adaptations. Here, we develop a biophysical model based on heat transfer and aerodynamic principles to investigate energy constraints on morphological evolution in bats. Our biophysical model predicts that the energy costs of thermoregulation and flight, respectively, impose upper and lower limits on the relationship of wing surface area to body mass (S-MR), giving rise to an optimal S-MR at which both energy costs are minimized. A comparative analysis of 278 species of bats supports the model’s prediction that S-MR evolves toward an optimal shape and that the strength of selection is higher among species experiencing greater energy demands for thermoregulation in cold climates. Our study suggests that energy costs modulate the mode of morphological evolution in bats-hence shedding light on a long-standing debate over bats’ conformity to ecogeographical patterns observed in other mammals-and offers a procedure for investigating complex macroecological patterns from first principles.