Explaining the structure of terrestrial and aquatic food webs remains one of the most important challenges of ecological theory. Most existing models use emergent properties of food webs, such as diversity and connectance as parameters, to determine other food-web descriptors. Lower-level processes, in particular adaptation (whether by behavioral, developmental, or evolutionary mechanisms), are usually not considered. Here, we show that complex, realistic food webs may emerge by evolution from a single ancestor based on very simple ecological and evolutionary rules. In our model, adaptation acts on body size, whose impact on the metabolism and interactions of organisms is well established. Based on parameters defined at the organism scale, the model predicts emergent properties at the food-web scale. Variations of two key parameters (width of consumption niche and competition intensity) allow very different food-web structures and functionings to emerge, which are similar to those observed in some of the best-documented food webs.