This book focuses on a consistent approach to the possible origin of a genetic code (GC) and DNA based on the energy evolution of an open thermodynamic system. A phenomenon of energy evolution heavily relies on the infrastructure and regularities of stochastic energy exchange (SEE). Mathematically, an energy evolution takes the form of a randomized energy continuity equation. A concept of openness is achieved by using an unlimited number of energy links with the external environment. The new morphological features of SEE, as well as the role of time symmetry breaking in the creation of an infrastructure of energy exchange, are presented. Discovered SEE advances serve as an intuitive foundation for the origin of a genetic code and energy skeleton of DNA. As a result, the suggested approach leads to the formation of the numerical structure of GC with the magic numbers 3, 4, 20, and 64, with an intuitive extension to the 3-D mathematical image demonstrating the number of key features of real DNA.