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 oligonucleotides 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 brought them in close proximity. This simple mechanism was 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 gave rise to a nonlinear replication process by the cooperative ligation of matching sequences which self-promoted their own elongation. This led to a cascade of enhanced template binding and faster ligation reactions. A requirement was 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 found that complementary sequences with an initially higher concentration prevailed over either non-complementary or less concentrated sequences. The latter died out by the molecular degradation that we simulated in the experiment by serial dilution. The experimental results are consistent with both explicit and abstract theory models that were 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 was driven by the same chemical mechanism that generated 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.