In this paper, a data-driven approach in conjunction with an adaptive extended Kalman filter (AEKF) is presented to estimate the state of charge (SOC) of lithium-ion battery in real-time. The Thevenin battery model is used to evaluate the effects using battery voltage and current. The advantages of the Lagrange multiplier method are utilized to model the lithium-ion battery. The Lagrange multiplier method continuously decreases the model error to adjust the Kalman gain of AEKF for accurate SOC estimation. Various current profiles such as hybrid pulse test, dynamic stress test, and Beijing dynamic stress test are used to verify the adaptability, robustness, and accuracy of the proposed approach. It is observed that the proposed approach outperforms other methodologies (recursive least square–AEKF and forgetting factor recursive least square–AEKF) due to its high accuracy (mean average error of 0.32%). Additionally, the proposed approach exhibits robustness and high convergence speed despite deliberate erroneous initialization of parameters, thus indicating its applicability in online SOC estimation applications.