With the widespread use of lithium-ion batteries (LIBs), prolonging the lifespan of LIBs is taken into account due to the polluting process of manufacturing and disposal compared to the clean using process of LIBs, which makes precise state of charge (SOC) estimation an essential for battery management systems (BMS). In this paper, a data-driven method (random forest, RF) based unscented Kalman filter (UKF) SOC estimation approach is proposed which considers different temperatures and can realize online implementation. Firstly, the RF is used to model the LIBs on the basis of voltage, current, voltage increment, and temperature. Then, UKF is employed to reduce the variances. Finally, the proposed method is validated by two dynamic profiles, Federal Driving Schedule and US06 Highway Driving Schedule, which indicates the RF-UKF approach is efficient in SOC estimation with the max errors within 0.72% and RMS errors within 0.4%.