The origin of the germline–soma distinction is a fundamental unsolved question. Plants and basal metazoans do not have a germline but generate gametes from pluripotent stem cells in somatic tissues (somatic gametogenesis). In contrast, most bilaterians sequester a dedicated germline early in development. We develop an evolutionary model which shows that selection for mitochondrial quality drives germline evolution. In organisms with low mitochondrial replication error rates, segregation of mutations over multiple cell divisions generates variation, allowing selection to optimize gamete quality through somatic game- togenesis. Higher mutation rates promote early germline sequestration. We also consider how oogamy (a large female gamete packed with mitochondria) alters selection on the germline. Oogamy is beneficial as it reduces mitochondrial segregation in early develop- ment, improving adult fitness by restricting variation between tissues. But it also limits vari- ation between early-sequestered oocytes, undermining gamete quality. Oocyte variation is restored through proliferation of germline cells, producing more germ cells than strictly needed, explaining the random culling (atresia) of precursor cells in bilaterians. Unlike other models of germline evolution, selection for mitochondrial quality can explain the sta- bility of somatic gametogenesis in plants and basal metazoans, the evolution of oogamy in all plants and animals with tissue differentiation, and the mutational forces driving early germline sequestration in active bilaterians. The origins of predation in motile bilaterians in the Cambrian explosion is likely to have increased rates of tissue turnover and mitochon- drial replication errors, in turn driving germline evolution and the emergence of complex developmental processes.