As climate change poses increasing challenges to ectotherm fitness through changes in the availability of suitable thermal habitats, understanding the interplay between behavioral thermoregulation and microhabitat availability is crucial. We employed a spatially explicit, individual-based model to investigate the effects of refuge density and social interactions on ectotherm thermoregulation using the Eastern Collared Lizard (Crotaphytus collaris) as a model. Both limited refuge availability and territoriality substantially impaired thermoregulation, especially for smaller, subordinate individuals that experienced temperature-induced mortality at high frequencies. Size-dependent mortality from exposure to lethal temperatures may have important consequences for population demography or social structure. Metabolic costs were primarily associated with high body temperatures rather than costs of locomotion. However, net energy assimilation was invariant to competition or refuge density. These findings emphasize the need for ecological models to incorporate complexities of natural environments, including social interactions, to accurately predict responses of ectotherm populations to environmental change.