Electrical energy consumption forecasting of crude oil pipelines plays a critical role in energy consumption target setting, batch scheduling, and unit commitment. For actual crude oil pipelines, because of its uncertainty, nonlinearity, intermittency, fluctuations and complexity, it is challenging to establish the electrical energy consumption forecasting model. And it is difficult to describe the non-linear characteristics of electrical energy consumption forecasting by traditional methods. Therefore, a novel hybrid electrical energy consumption forecasting system based on the combination of support vector machine (SVM) and improved particle swarm optimization (IPSO) is proposed, which includes four parts: data pre-processing part, optimization part, forecasting part, and evaluation part. In the pre-processing stage, in order to avoid large deviation caused by sampling stochasticity of small samples, the training set and the test set are divided by stratified sampling method. During the modeling process, the non-linear relationship in electrical energy consumption forecasting is efficiently represented by support vector machine, and the parameters of support vector machine regression are optimized by the improved particle swarm optimization algorithm. According to the established IPSO-SVM model, evaluation part is conducted to make a comprehensive evaluation for this framework. By comparing the evaluation indicators of IPSO-SVM with that of eight state-of-the-art forecasting methods, the effectiveness of IPSO-SVM method is evaluated. Based on the operation data of four crude oil pipelines in China, the results show that the proposed IPSO-SVM hybrid model has the best forecasting performance than other benchmark models, and its forecasting results are the closest to the actual data. It is concluded that the proposed approach can be an efficient technique for electrical energy consumption forecasting of crude oil pipelines.