In this paper, a fifth-order variable-coefficient nonlinear Schrödinger equation is investigated, which describes the propagation of the attosecond pulses in an optical fiber. Via the Hirota’s method and auxiliary functions, bilinear forms and dark one-, two- and three-soliton solutions are obtained. Propagation and interaction of the solitons are discussed graphically: We observe that the solitonic velocities are only related to β1(x), β2(x), β3(x) and β4(x), the coefficients of the second-, third-, fourth- and fifth-order terms, respectively, with x being the scaled distance, while the solitonic amplitudes are related to β1(x), β2(x), β3(x), β4(x) as well as the wave number. When β1(x), β2(x), β3(x) and β4(x) are the constants, or the linear, quadratic and trigonometric functions of x, we obtain the linear, parabolic, cubic and periodic dark solitons, respectively. Interactions between (among) the two (three) solitons are depicted, which can be regarded to be elastic because the solitonic amplitudes remain unchanged except for some phase shifts after each interaction in an optical fiber.