The origin of genetic codes is the key to reveal life’s origin on the earth as it is a prerequisite for the existence of life. More than half a century has passed since the discovery of genetic codes, while their origin is still one of the greatest mysteries. Are the origins of genetic codes really unknowable? Do they really require external design? Here, I present an ATP-hypothesis that explains how the genetic codes came into being with the coevolution of biochemical system. ATP has several properties that make it suitable as the initiator of the origin of genetic codes. First, ATP is the only energetic product of photosynthesis. Second, ATP is at the heart of the extant biochemical systems. Third, ATP serves as carriers of both energy and information. Fourth, ATP could energetically elongate chains of both polynucleotides and polypeptides, thus providing a bridge between them, and eventually mediating prebiotic biochemical transaction from energy to information. This hypothesis shows how primitive life emerged through a series of processes from energy to information mediated by ATP. Informatization (processes of creating and managing information) was inevitably coupled with structuralization (processes of organizing or incorporating into a cellular structure), making polynucleotides and polypeptides be cyclized into a system of reciprocal causation. The triplet codon might just be for stereo-chemical handing of amino acid through e.g. Watson–Crick pairing interactions. It is an evolutionary completion for genetic codes from RNA to DNA, only which, a reverse to the Central Dogma, marked the dawn of cellular life when Darwinian evolution began to operate. ATP-hypothesis shades lights on the origin of life, together with the formations of both photosynthesis and biochemical systems, which have been largely unknown so far.