In this work, we propose a new optimal perturbation iteration method for solving the generalized Fitzhugh–Nagumo equation with time-dependent coefficients. This research reveals that the new proposed technique, with the aid of symbolic computations, provides a straightforward and impressive mathematical tool for solving nonlinear partial differential equations. Implementing this method to Fitzhugh–Nagumo equation illustrates its potency. Convergence analysis also shows that OPIM, unlike many other methods in literature, converges fast to exact analytical solutions of the nonlinear problems at lower order of approximations. • We proposed a new efficient technique, optimal perturbation iteration technique, as an alternative method to some-well known methods in solving NPDEs. • The presented method has been favorably implemented to obtain the solution of the nonlinear generalized Fitzhugh–Nagumo equations. • Two illustration displays that the OPIM is forceful and prepotent mathematical tool to handle with these types of nonlinear equations. In this technique, it is basically crucial to get the parameters P0; P1; ::: and this makes OPIM time consuming, particularly for large n. • After first three iterations, we encounter a problem of high cost of calculations that takes up computer's memory. However, we have also witnessed that this technique converges fast at lower order of approximations for the nonlinear problems in this study. • Additionally, since the method is frequently toilsome to struggle by hand, one has to use a symbolic computer program to find approximate solutions. In this paper, we have used Mathematica 9.0 to carry out the complex computations in examples. It should be also said that one can get better solutions with more powerful processors or computers. [ABSTRACT FROM AUTHOR]