Method for desulfurization of a nitrogen oxide trap for the after-treatment of exhaust gases emitted by an internal combustion engine of a motor vehicle comprising an alternation of rich and lean periods, which involves implementing at least one long lean period to allow the substantial increase of the parameter of oxygen storage capacity of the nitrogen oxide trap, characterized in that it comprises the following steps when the nitrogen oxide trap is in a lean period: - determining the end of the short lean period by applying a first law, - when the first law determines the end of the short lean period, determining if it is necessary to implement a long lean period allowing the return of the parameter of oxygen storage to a value equivalent to the start of the desulfurization by applying a second law in order to stop or continue the lean period, the said second law taking into account a slow dynamic of an evolution of a parameter of oxygen storage capacity of the nitrogen oxide trap, and in that it comprises the verification of at least one of the following conditions to determine the implementation of a long lean period: - the number of rich periods implemented from the last long lean period reaches a predetermined threshold; and/or - the cumulative duration of the rich periods implemented from the last long lean period reaches a predetermined threshold; and/or - the quantity of excess reducing components having arrived at the inlet of the NOx trap from the last long lean period reaches a predetermined threshold; and/or - the temperature measured or modelled in a given location of the NOx trap is greater than a predetermined threshold; and/or - the cumulative duration during which the temperature measured or modelled in a given location of the NOx trap is greater than a predetermined threshold. - determining the end of the short lean period by applying a first law, - when the first law determines the end of the short lean period, determining if it is necessary to implement a long lean period allowing the return of the parameter of oxygen storage to a value equivalent to the start of the desulfurization by applying a second law in order to stop or continue the lean period, the said second law taking into account a slow dynamic of an evolution of a parameter of oxygen storage capacity of the nitrogen oxide trap, and in that it comprises the verification of at least one of the following conditions to determine the implementation of a long lean period: - the number of rich periods implemented from the last long lean period reaches a predetermined threshold; and/or - the cumulative duration of the rich periods implemented from the last long lean period reaches a predetermined threshold; and/or - the quantity of excess reducing components having arrived at the inlet of the NOx trap from the last long lean period reaches a predetermined threshold; and/or - the temperature measured or modelled in a given location of the NOx trap is greater than a predetermined threshold; and/or - the cumulative duration during which the temperature measured or modelled in a given location of the NOx trap is greater than a predetermined threshold. - the number of rich periods implemented from the last long lean period reaches a predetermined threshold; and/or - the cumulative duration of the rich periods implemented from the last long lean period reaches a predetermined threshold; and/or - the quantity of excess reducing components having arrived at the inlet of the NOx trap from the last long lean period reaches a predetermined threshold; and/or - the temperature measured or modelled in a given location of the NOx trap is greater than a predetermined threshold; and/or - the cumulative duration during which the temperature measured or modelled in a given location of the NOx trap is greater than a predetermined threshold.