A distributed laser model is applied to explain the multi-peak shape of the pulses generated by the actively Q-switched erbium-doped fiber laser. In the model, all kinds of intra-cavity losses are taken into account, including the point losses produced by fiber splices and intra-cavity elements, and the distributed loss, such as the active fiber background loss and the loss caused by excited state absorption inherent in erbium-doped fibers. The model also takes into account the exact function that describes the switching dynamics of the Q-switch modulator. We show that the distributed model allows an accurate simulation of the laser pulse shape and energy, providing therefore a good agreement with the experimental results. The origin of a multi-peak pulse shape frequently observed in QS-EDFL and some other features that result from the model are discussed.