The state of charge (SOC) estimation of Li-ion batteries has attracted substantial interests in recent years. Kalman Filter has been widely used in real-time battery SOC estimation, however, to build a suitable dynamic battery state-space model is a key challenge, and most existing methods still use the off-line modelling approach. To capture the dynamics of Li-ion batteries in real-time, a sparse learning machine based on the traditional least squares support vector machine (LS-SVM) formulation is proposed. The sparse learning machine is trained with a very small set of samples which enables real-time modelling. The least squares support vector machine is the least squares version of the conventional support vector machines (SVMs) which finds the solution quickly by solving a set of linear equations rather than solving a raised optimized programing problem with inequality constraints. But it suffers from low model sparseness and accuracy. To further accelerate the calculation and to improve the model accuracy for the real-time modelling purpose, a novel sparse solution learning machine is first proposed. A fast recursive method is used to select the number of mapping functions in the feature space. Then, an unscented Kalman filter (UKF) is used for the real-time SOC estimation based on the new sparse learning machine model. Experimental results on the Federal Urban Drive Schedule (FUDS) test data reveal that the performance of the proposed algorithm is enhanced in which the maximum absolute error is one sixth of the maximum absolute error in the conventional LS-SVMs and the mean square error of the SOC estimations reaches to 10 −7 , while the proposed method is executed nearly 10 times faster than the conventional LS-SVMs. INDEX TERMS sparse learning machine; state-of-charge (SOC); least squares support vector machine (LS-SVM); differential evolution (DE); unscented Kalman filter (UKF)