In this article, we study solitary wave solutions of the generalized Benjamin–Bona–Mahony–Burgers (gBBMB) equation using higher-order shape elements in the Galerkin finite element method (FEM). Higher-order elements in FEMs are known to produce better results in solution approximations; however, these elements have received fewer studies in the literature. As a result, for the finite element analysis of the gBBMB equation, we consider Lagrange quadratic shape functions. We employ the Galerkin finite element approximation to derive a priori error estimates for semi-discrete solutions. For fully discrete solutions, we adopt the Crank–Nicolson approach, and to handle nonlinearity, we utilize a predictor–corrector scheme with Crank–Nicolson extrapolation. Additionally, we perform a stability analysis for time using the energy method. In the space, O(h3) convergence in L2(Ω) norm and O(h2) convergence in H1(Ω) norm are observed. Furthermore, an optimal O(Δt2) convergence in the maximum norm for the temporal direction is also obtained. We test the theoretical results on a few numerical examples in one- and two-dimensional spaces, including the dispersion of a single solitary wave and the interaction of double and triple solitary waves. To demonstrate the efficiency and effectiveness of the present scheme, we compute L2 and L∞ normed errors, along with the mass, momentum, and energy invariants. The obtained results are compared with the existing literature findings both numerically and graphically. We find quadratic shape functions improve accuracy in mass, momentum, energy invariants and also give rise to a higher order of convergence for Galerkin approximations for the considered nonlinear problems.