Each living species carries a complex DNA sequence that determines their unique features and functionalities. It is generally assumed that life started from a random pool of oligonucleotide sequences, generated by a prebiotic polymerization of nucleotides. The mechanism that initially facilitated the emergence of sequences that code for the function of the first species from such a random pool of sequences remains unknown. It is a central problem of the origin of life. An interesting option would be a self-selection mechanism by spontaneous symmetry breaking. Initial concentration fluctuations of specific sequence motifs would have been amplified and outcompeted less abundant sequences, enhancing the signal to noise to replicate and select functional sequences. Here, we demonstrate with experimental and theoretical findings that templated ligation would provide such a self-selection. In templated ligation, two adjacent single sequences strands are chemically joined when a third complementary strand sequence brings them in close proximity. This simple mechanism is a likely side product of a prebiotic polymerization chemistry once the strands reach the length to form double-stranded species. As shown here, the ligation gives rise to a nonlinear replication process by the cooperative ligation of matching sequences which self-promote their own elongation. This process leads to a cascade of enhanced template binding and faster ligation reactions. A requirement is the reshuffling of the strands by thermal cycling, enabled, for example, by microscale convection. By using a limited initial sequence space and performing long-term ligations, we find that complementary sequences with an initially higher concentration prevail over either noncomplementary or less-concentrated sequences. The latter die out by the molecular degradation that we simulate in the experiment by serial dilution. The experimental results are consistent with both explicit and abstract theory models that are generated considering the ligation rates determined experimentally. Previously, other nonlinear modes of replication such as hypercycles have been discussed to overcome instabilities from first-order replication dynamics such as the error catastrophe and the dominance of structurally simple but fast-replicating sequences, known as the Spiegelman problem. Assuming that templated ligation is driven by the same chemical mechanism that generates prebiotic polymerization of oligonucleotides, the mechanism could function as a missing link between polymerization and the self-stabilized replication, offering a pathway to the autonomous emergence of Darwinian evolution for the origin of life.