Bacterial populations can evolve and adapt to become diverse niche specialists, even in seemingly homogeneous environments. One source of this diversity arises from newly 'constructed' niches that result from the activities of the bacteria themselves. Ecotypes specialized to exploit these distinct niches can subsequently coexist via frequency-dependent interactions. Here, we describe a novel form of niche construction that is based upon differential death and cannibalism, and which evolved during 20 000 generations of experimental evolution in Escherichia coli in a seasonal environment with alternating growth and starvation. In one of 12 populations, two monophyletic ecotypes, S and L, evolved that stably coexist with one another. When grown and then starved in monoculture, the death rate of S exceeds that of L, whereas the reverse is observed in mixed cultures. As shown by experiments and numerical simulations, the competitive advantage of S cells is increased by extending the period of starvation, and this advantage results from their cannibalization of the debris of lysed L cells, which allows the S cells to increase both their growth rate and total cell density. At the molecular level, the polymorphism is associated with divergence in the activity of the alternative sigma factor RpoS, with S cells displaying no detectable activity, while L cells show increased activity relative to the ancestral genotype. Our results extend the repertoire of known cross-feeding mechanisms in microbes to include cannibalism during starvation, and confirm the central roles for niche construction and seasonality in the maintenance of microbial polymorphisms.