In this paper, 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 $N$th-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 background wave depend on $g(z)$.