Body size is a trait that shapes many aspects of a species' development and evolution. Larger body size is often beneficial in animals, but it can also be associated with life history costs in natural systems. Similarly, miniaturization, the evolution of extremely small adult body size, is found in every major animal group, yet carries its own life history trade-offs. Given that these effects can depend on an animal's environment and life stage and have mainly been studied in species that are already specialized for their size, the life history changes associated with evolutionary shifts in body size warrant additional investigation. Here, we used Drosophila melanogaster populations that had undergone over 400 generations of artificial selection on body size to investigate the changes in life history traits associated with the evolution of extremely large and extremely small body sizes. Populations selected for small body size experienced strong trade-offs in multiple life history traits, including reduced female fecundity and lower juvenile viability. Although we found positively correlated changes in egg size associated with selection for both large and small body size, after adjusting for female body size, females from populations selected for large size had the lowest relative investment per egg and females from populations selected for small size had the highest relative investment per egg. Taken together, our results suggest that egg size may be a key constraint on the evolution of body size in D. melanogaster, providing insight into the broader phenomenon of body size evolution in insects.