Persistent nutrient excess results in a compensatory increase in the β-cell number in mammals. It is unknown whether this response occurs in nonmammalian vertebrates, including zebrafish, a model for genetics and chemical genetics. We investigated the response of zebrafish β-cells to nutrient excess and the underlying mechanisms by culturing transgenic zebrafish larvae in solutions of different nutrient composition. The number of β-cells rapidly increases after persistent, but not intermittent, exposure to glucose or a lipid-rich diet. The response to glucose, but not the lipid-rich diet, required mammalian target of rapamycin activity. In contrast, inhibition of insulin/IGF-1 signaling in β-cells blocked the response to the lipid-rich diet, but not to glucose. Lineage tracing and marker expression analyses indicated that the new β-cells were not from self-replication but arose through differentiation of postmitotic precursor cells. On the basis of transgenic markers, we identified two groups of newly formed β-cells: one with nkx2.2 promoter activity and the other with mnx1 promoter activity. Thus, nutrient excess in zebrafish induces a rapid increase in β-cells though differentiation of two subpopulations of postmitotic precursor cells. This occurs through different mechanisms depending on the nutrient type and likely involves paracrine signaling between the differentiated β-cells and the precursor cells.