This study investigates accurate state of charge estimation algorithms for lithium-ion batteries based on the long short-term memory recurrent neural network and transfer learning. The long short-term memory network with the five typical layer topology is firstly constructed to learn the dependency of state of charge on measured variables. The transfer learning algorithm with fine-tuning strategy is then exploited to regulate the parameters of fully connected layer and share the knowledge of other layers. By this manner, the information from the source data can be applied to predict state of charge of other batteries with less training data. Additionally, a rolling learning method is developed to update the model parameters when the battery capacity is degraded. The precision and robustness of the proposed framework are comprehensively validated through comparative analysis of multitudinous sets of hyperparameters and methods. The experimental results manifest that the developed framework highlights precise estimation capability of state of charge at different aging states and time-varying temperature conditions. In addition, the proposed algorithm is verified feasible when transferred to different batteries based on only 30% training data.