This paper considers a general approach to fault diagnosis using a generalized Hamiltonian system representation. It can be considered that, in general, nonlinear systems still represent a problem in fault diagnosis because there are results only for a specific class of them. Therefore, fault diagnosis remains a challenging research area despite the maturity of some of the available results. In this work, a type of nonlinear system that admits a generalized Hamiltonian representation is considered; in practice, there are many systems that have this kind of representation. Thereupon, an approach for fault detection and isolation based on the Hamiltonian representation is proposed. First, following the classic approach, the original system is decoupled in different subsystems so that each subsystem is sensitive to one particular fault. Then, taking advantage of the structure, a simple way to design the residuals is presented. Finally, the proposed scheme is validated at the two-degree of freedom (DOF) helicopter of Quanser®, where the presence of faults in sensors and actuators were considered. The results show the efficacy of the proposed scheme.