It is one of basic tasks to solve the electrochemical model of lithium-ion batteries for obtaining the lithium-ion concentration in the electrolyte. In order to balance the computational efficiency and electrolyte dynamic property, it is assumed that reactions occur only at interfaces between the collector and the electrolyte. Based on the analytical solution to the liquid diffusion equations, which is in the form of infinite series, a new method is proposed to solve it. Under galvanostatic profiles, the analytic solution is an infinite time series transformed into a converged sum function by using the monotone convergence theorem. Under the dynamic profiles, the infinite series solution is simplified into an infinite discrete convolution of both the input and the sum function. The sum function is truncated by its characteristic of monotonic decay approaching to zero over time, thus obtaining a finite discrete convolution algorithm. Reference to the results from a professional finite element analysis software, the proposed algorithm can produce high accuracy with less computation time under both galvanostatic profiles and dynamic profiles. Also, there is only one parameter to be configured. Therefore, our algorithm will reduce the computation burden of the electrochemical model applied to a real-time battery management system.