Before the origin of simple cellular life, the building blocks of RNA (nucleotides) had to form and polymerize in favorable environments on early Earth. At this time, meteorites and interplanetary dust particles delivered organics such as nucleobases (the characteristic molecules of nucleotides) to warm little ponds whose wet–dry cycles promoted rapid polymerization. We build a comprehensive numerical model for the evolution of nucleobases in warm little ponds leading to the emergence of the first nucleotides and RNA. We couple Earth’s early evolution with complex prebiotic chemistry in these environments. We find that RNA polymers must have emerged very quickly after the deposition of meteorites (less than a few years). Their constituent nucleobases were primarily meteoritic in origin and not from interplanetary dust particles. Ponds appeared as continents rose out of the early global ocean, but this increasing availability of “targets” for meteorites was offset by declining meteorite bombardment rates. Moreover, the rapid losses of nucleobases to pond seepage during wet periods, and to UV photodissociation during dry periods, mean that the synthesis of nucleotides and their polymerization into RNA occurred in just one to a few wet–dry cycles. Under these conditions, RNA polymers likely appeared before 4.17 billion years ago.