A whale optimization algorithm combining a non-linear convergence factor and differential evolution is proposed to address the shortcomings of the Whale Optimization Algorithm (WOA) in terms of insufficient search capability and the tendency to fall into local extremes. The exploration and exploitation capabilities of the WOA are coordinated through an improved non-linear convergence factor, and the global optimization-seeking capabilities are enhanced through differential evolution. A total of 10 single-peaked and multi-peaked benchmark functions were tested, and the mean of the convergence results from 100 runs are give, as well as the success rate of the search. The results are compared with the WOA and the WOA improved by the adaptive weighting strategy alone, showing that the improved WOA is significantly better than the compared algorithm in terms of the merit-seeking ability and convergence speed. The proposed algorithm is applied to the state of charge estimation of Li-ion batteries, and verified with smaller error.