Energy prediction of machine tools plays an irreplaceable role in energy planning, management, and conservation in the manufacturing industry. In the era of big machinery data, data-driven energy prediction models of machine tools have achieved remarkable results in the identification of energy consumption patterns and prediction of energy consumption conditions. However, existing data-driven studies towards the energy consumption of machine tools focus on the utilization of handcrafted-feature learning methods, which are inefficient and exhibit poor generalization. Moreover, considering variations in energy consumption characteristics among different machine tools, it is impractical to identify energy consumption features manually for energy model development. Therefore, this paper proposes a novel data-driven energy prediction approach using deep learning algorithms. Here, deep learning is used in an unsupervised manner to extract sensitive energy consumption features from raw machinery data, and in a supervised manner to develop the prediction model between the extracted features and the energy consumption of machine tools. The experiments conducted on a milling machine and a grinding machine are exploited and compared with those conducted in conventional studies. The results show that the proposed method can improve the energy prediction performance from 19.14% to 74.13% for the grinding machine and from 64.89% to 85.61% for the milling machine, and it achieves a better performance than the conventional methods in terms of effectiveness and generalization.