This paper deals with spare parts demand forecasting problem in energy industry. Forecasting spare parts demand has its own challenges because in general spare parts demand is characterized by high variation in its demand size and in its inter-demand interval. In this paper, a forecasting approach to deal with spare parts demand is proposed. The proposed approach utilized stacked generalization technique to combine traditional time series forecasting method and machine learning method into a single ensemble. To test its performance, a case study in a natural gas liquefaction company is provided in this paper. In the case study, the proposed approach is utilized to forecast the monthly demand of spare parts used for maintenance operations. To compare its performance, several traditional time series forecasting methods (including Moving Average, Single Exponential Smoothing, Croston's method, Syntetos-Boylan Approximation, and Teunter-Syntetos-Babai) and several machine learning methods (including Linear Regression, Elastic Net, Neural Network, Support Vector Machine, and Random Forests) are also used in the case study. As results, the proposed approach performed better than other methods in terms of forecast error minimization.