Abstract We study a generalized higher-order nonlinear Schrödinger equation in an optical fiber or a planar waveguide. We obtain the Lax pair and N-fold Darboux transformation (DT) with N being a positive integer. Based on Lax pair obtained by us, we derive the infinitely-many conservation laws. We give the bright one-, two-, and N-soliton solutions, and the first-, second-, and Nth-order breather solutions based on the N-fold DT. We conclude that the velocities of the bright solitons are influenced by the distributed gain function, g(z), and variable coefficients in equation, h 1(z), p 1(z), r 1(z), and s 1(z) via the asymptotic analysis, where z represents the propagation variable or spatial coordinate. We also graphically observe that: the velocities of the first- and second-order breathers will be affected by h 1(z), p 1(z), r 1(z), and s 1(z), and the background wave depends on g(z).