This paper considers the group output consensus problem for a class of disturbed port-controlled Hamiltonian multi-agent systems via a composite control method. The composite distributed control protocol is proposed by combining the damping injection and energy shaping method, the finite-time disturbance observer (FTDO) technique and distributed protocol, which makes the closed-loop Hamiltonian multi-agent systems asymptotically stable and the group outputs reach consensus. It is shown that many kinds of disturbances can be estimated accurately via the FTDO. The advantage is that this control scheme exhibits not only better robustness against disturbances, but also the nominal system recovery performance. Two illustrative examples reveal that the designed control protocol is effective.