Egg and sperm cells (gametes) of the mouse are derived from a founder population of primordial germ cells that are set aside early in embryogenesis. Primordial germ cells arise from the proximal epiblast, a region of the early mouse embryo that also contributes to the first blood lineages of the embryonic yolk sac. Embryonic stem cells differentiate in vitro into cystic structures called embryoid bodies consisting of tissue lineages typical of the early mouse embryo. Because embryoid bodies sustain blood development, we reasoned that they might also support primordial germ cell formation. Here we isolate primordial germ cells from embryoid bodies, and derive continuously growing lines of embryonic germ cells. Embryonic germ cells show erasure of the methylation markers (imprints) of the Igf2r and H19 genes, a property characteristic of the germ lineage. We show that embryoid bodies support maturation of the primordial germ cells into haploid male gametes, which when injected into oocytes restore the somatic diploid chromosome complement and develop into blastocysts. Our ability to derive germ cells from embryonic stem cells provides an accessible in vitro model system for studies of germline epigenetic modification and mammalian gametogenesis.