© 2020, MDPI AG. All rights reserved. The development of an accurate and robust state-of-charge (SOC) estimation is crucial for the battery lifetime, efficiency, charge control, and safe driving of electric vehicles (EV). This paper proposes an enhanced data-driven method based on a time-delay neural network (TDNN) algorithm for state of charge (SOC) estimation in lithium-ion batteries. Nevertheless, SOC accuracy is subject to the suitable value of the hyperparameters selection of the TDNN algorithm. Hence, the TDNN algorithm is optimized by the improved firefly algorithm (iFA) to determine the optimal number of input time delay (UTD) and hidden neurons (HNs). This work investigates the performance of lithium nickel manganese cobalt oxide (LiNiMnCoO2 ) and lithium nickel cobalt aluminum oxide (LiNiCoAlO2 ) toward SOC estimation under two experimental test conditions: the static discharge test (SDT) and hybrid pulse power characterization (HPPC) test. Also, the accuracy of the proposed method is evaluated under different EV drive cycles and temperature settings. The results show that iFA-based TDNN achieves precise SOC estimation results with a root mean square error (RMSE) below 1%. Besides, the effectiveness and robustness of the proposed approach are validated against uncertainties including noise impacts and aging influences.