Microbes are capable of physiologically adapting to diverse environmental conditions by differentially varying the rates at which they uptake different nutrients. In particular, microbes can switch hierarchically between different energy sources, consuming first those that ensure the highest growth rate. Experimentally, this can result in biphasic growth curves called “diauxic shifts” that typically arise when microbes are grown in media containing several nutrients. Despite these observations are well known in microbiology and molecular biology, the mathematical models generally used to describe the population dynamics of microbial communities do not account for dynamic metabolic adaptation, thus implicitly assuming that microbes cannot switch dynamically from one resource to another. Here, we introduce dynamic metabolic adaptation in the framework of consumer-resource models, which are commonly used to describe competitive microbial communities, allowing each species to temporally change its preferred energy source to maximize its own relative fitness. We show that dynamic metabolic adaptation enables the community to self-organize, allowing several species to coexist even in the presence of few resources, and to respond optimally to a time-dependent environment, thus showing that dynamic metabolic adaptation could be an important mechanism for maintaining high levels of diversity even in environments with few energy sources. We show that introducing dynamic metabolic strategies in consumer-resource models is necessary for reproducing experimental growth curves of the baker’s yeast Saccharomyces cerevisiae growing in the presence of two carbon sources. Even though diauxic shifts emerge naturally from the model when two resources are qualitatively very different, the model predicts that the existence of such shifts is not a prerequisite for species coexistence in competitive communities.