In this paper, a new generalized exponential rational function method is employed to extract new solitary wave solutions for the Zakharov–Kuznetsov equation (ZKE). The ZKE exhibits the behavior of weakly nonlinear ion-acoustic waves in incorporated hot isothermal electrons and cold ions in the presence of a uniform magnetic field. Furthermore, the stability for the governing equations is investigated via the aspect of linear stability analysis. Numerical simulations are made to shed light on the characteristics of the obtained solutions