As a major energy sources province in China, Shaanxi Province ranks top three in terms of raw coal production in China and undertakes the important task of ensuring national energy supply and security. Affected by the endowment of energy resources, fossil energy accounts for a large proportion of the energy consumption structure in Shaanxi Province, and it will face huge challenges under the severe carbon emission situation in future. In order to analyze the relationship between energy consumption structure, energy efficiency and carbon emissions, the paper introduces the concept of biodiversity into the energy industry. Taking Shaanxi Province as an example, the paper calculates the energy consumption structure diversity index and analyzes the impact of energy consumption structure diversity on energy efficiency and carbon emissions in Shaanxi Province. The results shows that the diversity index and equilibrium index of energy consumption structure in Shaanxi exhibits a slow upward trend in general. In most years, energy consumption structure diversity index in Shaanxi is higher than 0.8, and the equilibrium index is higher than 0.6. The carbon emissions of energy consumption in Shaanxi generally show increasing trend, and the carbon emissions have increased from 5,064.6 tons to 21899.67 tons from 2000 to 2020. The paper also shows that Shaanxi H index is negatively correlated with total factor energy utilization efficiency in Shaanxi, and positively correlated with carbon emissions in Shaanxi. The main reason is the internal substitution of fossil energy, and the proportion of primary electricity and other energy sources is still relatively low, which leads to a higher level of carbon emissions.