Lithium-ion batteries (LIB) have been widely used in modern electric vehicles. The reliable, efficient, and safe operation of LIB requires monitoring, control and management. An accurate estimation of the state of charge (SOC) is necessary not only for optimal energy management but also for protecting the LIB from being deeply discharged or overcharged. In this paper, an equivalent circuit model (ECM) is used to simulate the dynamic behavior of LIB. Parameters of internal resistance, diffusion resistance and diffusion capacitance are identified using the recursive least square method. Because open circuit voltage (OCV) and SOC have an obviously nonlinear relationship, an extended Kalman filter (EKF) is used to estimate the SOC based on the ECMS model. Despite the nonlinearity of the SOC-OCV curve, the SOC has small variations for ordinary charging or discharging current rates. The curve can be approximated by a straight line with the slope and intersection changing at different SOCs. Local linearization can be employed to linearize the SOC-OCV curve at the present working point. Simulation results show that the estimation error of the proposed algorithm is less than 5% for the test patterns.