Method for diagnosing a hybrid powertrain of a motor vehicle, comprising a first electric machine for driving the motor vehicle, which first electric machine is connected via a first inverter to a DC voltage bus the voltage of which is smoothed by a passive damping element, the hybrid powertrain further comprising a second electric machine that is able to receive the energy produced by an internal combustion engine and to transmit it to said DC voltage bus, a second inverter, which is connected between said second electric machine and said DC voltage bus, regulating the voltage of said DC voltage bus; and an electric storage battery connected to the DC voltage bus by a commanded relay so as to supply a DC voltage (V DC) to said DC voltage bus; the motor vehicle comprising a control element for controlling the powertrain, which control element is designed to implement the following steps: - Commanding the opening of said commanded relay so as to isolate the battery from the DC voltage bus; - Defining a variable diagnostic voltage function (Vdiag) as a function of a setpoint voltage (Vcons) of the DC voltage bus and of a periodic variable component; - Defining a distance threshold amplitude (ΔVmax) of the variable diagnostic voltage (Vdiag); - Commanding said second inverter to regulate the DC voltage bus to said variable diagnostic voltage (Vdiag); - Checking, over a sliding window of a predefined duration, whether the voltage (V DC) of the DC voltage bus follows the variable diagnostic voltage (Vdiag) with a deviation less than the defined threshold amplitude (ΔVmax); - Diagnosing the opening of the relay according to the following conditions: ∘ If, over the predefined duration of said sliding window, the voltage of the DC voltage bus has followed the variable diagnostic voltage (Vdiag) with a deviation less than or equal to the defined threshold amplitude, diagnose that said relay is open; and ∘ If, during the predefined duration of said sliding window, the voltage of the voltage bus has deviated from the variable diagnostic voltage (Vdiag) with a deviation greater than the defined threshold amplitude, diagnose that said relay is not correctly opened. - Commanding the opening of said commanded relay so as to isolate the battery from the DC voltage bus; - Defining a variable diagnostic voltage function (Vdiag) as a function of a setpoint voltage (Vcons) of the DC voltage bus and of a periodic variable component; - Defining a distance threshold amplitude (ΔVmax) of the variable diagnostic voltage (Vdiag); - Commanding said second inverter to regulate the DC voltage bus to said variable diagnostic voltage (Vdiag); - Checking, over a sliding window of a predefined duration, whether the voltage (V DC) of the DC voltage bus follows the variable diagnostic voltage (Vdiag) with a deviation less than the defined threshold amplitude (ΔVmax); - Diagnosing the opening of the relay according to the following conditions: ∘ If, over the predefined duration of said sliding window, the voltage of the DC voltage bus has followed the variable diagnostic voltage (Vdiag) with a deviation less than or equal to the defined threshold amplitude, diagnose that said relay is open; and ∘ If, during the predefined duration of said sliding window, the voltage of the voltage bus has deviated from the variable diagnostic voltage (Vdiag) with a deviation greater than the defined threshold amplitude, diagnose that said relay is not correctly opened. ∘ If, over the predefined duration of said sliding window, the voltage of the DC voltage bus has followed the variable diagnostic voltage (Vdiag) with a deviation less than or equal to the defined threshold amplitude, diagnose that said relay is open; and ∘ If, during the predefined duration of said sliding window, the voltage of the voltage bus has deviated from the variable diagnostic voltage (Vdiag) with a deviation greater than the defined threshold amplitude, diagnose that said relay is not correctly opened.