This paper proposes a real-time state of charge (SOC) and electrical impedance estimation method for lithium-ion batteries based on a hybrid battery model. The hybrid battery model consists of an enhanced Coulomb counting algorithm for SOC estimation and an electrical circuit battery model. A particle swarm optimization (PSO)-based online parameter identification algorithm is designed to estimate the electrical impedances and open-circuit voltage of the electrical circuit battery model. A SOC compensator is designed to correct the error of the Coulomb counting-based SOC estimation, leading to a closed-loop, accurate, robust real-time SOC estimation. The proposed method is validated by using experimental data collected from a battery tester for a polymer lithium-ion battery cell. The proposed method is applicable to other types of electrochemical battery cells.