Carbon peaking and carbon neutrality are Chinas national goals set as policy based on international responsibilities and national strategic needs in the context of global climate change. The energy law, in the intersection zone of function and value, has the latent and negative function of the tension between supply security value and environmental security value, and between efficiency value and equity value caused by lowcarbon function transition as well as the obvious and positive function of the fit between lowcarbon function transition and multivalue. On the basis of clarifying the causal relationship between the structural obstacles and the functional results of the energy law, and under the guidance of ecological practical rationality, we take “ecological bonum” as the value coordinate, follow the principle of integration, progression, common but differentiated responsibilities, and guarantee of citizen basic rights to use energy and other value principles, and put forward the legal countermeasures and suggestions to solve the structural obstacles of energy law and eliminate its latent and negative functions. These measures include reconstructing the legal system with the basic energy law as the core and in coordination with relevant departmental laws. We also set “carbon peak and carbon neutrality” as the direct regulatory goal, and build a structurally complementary system between fossil energy constraint and nonfossil energy promotion, and a structurally coordinating system between governmental power, market property rights and public rights.