Increasing energy efficiency is one of the main goals in current German energy and climate policies. We study the determinants of energy efficiency in the German manufacturing sector based on official firm-level production census data. By means of a stochastic frontier analysis, we estimate the cost-minimizing energy demand function at the two-digit industry level using firm-level heterogeneity. Apart from the identification of the determinants of the energy demand function, we also analyze potential drivers of energy efficiency. Our results suggest that there is still potential to increase energy efficiency in most industries of the German manufacturing sector. Furthermore, we find that in most industries exporting and innovating firms as well as those investing in environmental protection measures are more energy efficient than their counterparts. In contrast, firms which are regulated by the European Union Emissions Trading System are mostly less energy efficient than non-regulated firms.