Efforts to decarbonize the world have shown a quick increase in electric vehicles (EVs), limiting increasing pollution. During this electric transportation revolution, lithium-ion batteries (LIBs) play a vital role in storing energy. To determine the range of an electric vehicle (EV), the state of charge and the state of health (SOH) of the battery pack is essential. Access to high-quality data on battery parameters is a crucial challenge for researchers working in the energy storage domain due primarily to confidentiality constraints on manufacturers of batteries and EVs. This paper proposes a hybrid framework for predicting the state of a lithium-ion battery for electric vehicles (EV). Electric vehicles are growing worldwide because of their environmental and sustainability advantages. Batteries are replacing fossil fuels in electric vehicles. In order to prevent failure, Li-ion batteries in electric vehicles should be operated and controlled in a controlled and progressive manner to ensure increased efficiency and safety. An extreme gradient boosting (XGBoost) algorithm is used in this paper to estimate the state of health (SOH) of lithium-ion batteries used in electric vehicles. The model is subjected to error analysis to optimize the battery’s performance parameter. The model undergoes an error analysis to optimize its performance parameters. Furthermore, a state of health (SOH) estimation method based on the extreme gradient boosting algorithm with accuracy correction is proposed here to improve the accuracy of state of health (SOH) estimation for lithium-ion batteries. To describe the aging process of batteries, we extract several features such as average voltages, voltage differences, current differences, and temperature differences. The extreme gradient boosting (XGBoost) model for estimating the state of health (SOH) of lithium-ion batteries is based on the ensemble learning algorithm’s higher prediction accuracy and generalization ability. Experimental results suggest that the boundary gradient lifting algorithm model is capable of more accurate prediction.