Method for controlling a hybrid propulsion system, comprising at least one electric machine, at least one combustion engine, at least one system for storing electric energy powering said electric machine, a kinematic chain for coupling said electric machine and said combustion engine, and a system for after-treatment of polluting emissions output from said combustion engine, wherein a torque setpoint TPT sp is obtained for said propulsion system, this comprising the following steps: a) the set of commands acceptable to said propulsion system is discretized, with a view to achieving said torque setpoint TPT SP of the propulsion system, by generating a mesh of the set of acceptable commands forming a vector of acceptable commands containing a vector of torques acceptable to the combustion engine; b) a model of said propulsion system is constructed, which model relates a cost function to a command applied to said propulsion system, said cost function being a function of the consumption of said propulsion system and of the polluting emissions output from said after-treatment system, said cost function of the model of the hybrid propulsion system being expressed by a formula of the following type H(u 1, u 2, x, t) = f ( u 1, u 2, t) + A (t) × ẋ ( u 1, u 2, x, t) with f(u 1, u 2, t) = (1 - α) × ṁ f (u 1, u 2, t) + α × ṁ NO x TP ( u 1, u 2, t) and ṁ NO x TP ( u 1, u 2, x, t) = ṁ NO x EO ( u 1, u 2, x, t) × (1 - η AT (T AT)) with u 1 the torque command T eng applied to said combustion engine, u 2 the command applied to said kinematic chain ECC, x the state of charge of said system for storing electric energy, m f the consumption of said combustion engine, m NO x TP the NO x emissions output from said after-treatment system, α a calibration variable, A the Lagrange multiplier, t time, and m NOxEO the polluting emissions output from said combustion engine, η AT the efficiency of said after-treatment system, and T AT the temperature of said after-treatment system; c) a command to be given to said propulsion system is determined by minimizing said cost function of said model of the propulsion system in light of said discretized acceptable commands; and d) said determined command is applied to said hybrid propulsion system. a) the set of commands acceptable to said propulsion system is discretized, with a view to achieving said torque setpoint TPT SP of the propulsion system, by generating a mesh of the set of acceptable commands forming a vector of acceptable commands containing a vector of torques acceptable to the combustion engine; b) a model of said propulsion system is constructed, which model relates a cost function to a command applied to said propulsion system, said cost function being a function of the consumption of said propulsion system and of the polluting emissions output from said after-treatment system, said cost function of the model of the hybrid propulsion system being expressed by a formula of the following type H(u 1, u 2, x, t) = f ( u 1, u 2, t) + A (t) × ẋ ( u 1, u 2, x, t) with f(u 1, u 2, t) = (1 - α) × ṁ f (u 1, u 2, t) + α × ṁ NO x TP ( u 1, u 2, t) and ṁ NO x TP ( u 1, u 2, x, t) = ṁ NO x EO ( u 1, u 2, x, t) × (1 - η AT (T AT)) with u 1 the torque command T eng applied to said combustion engine, u 2 the command applied to said kinematic chain ECC, x the state of charge of said system for storing electric energy, m f the consumption of said combustion engine, m NO x TP the NO x emissions output from said after-treatment system, α a calibration variable, A the Lagrange multiplier, t time, and m NOxEO the polluting emissions output from said combustion engine, η AT the efficiency of said after-treatment system, and T AT the temperature of said after-treatment system; u 1 the torque command T eng applied to said combustion engine, u 2 the command applied to said kinematic chain ECC, x the state of charge of said system for storing electric energy, m f the consumption of said combustion engine, m NO x TP the NO x emissions output from said after-treatment system, α a calibration variable, A the Lagrange multiplier, t time, and m NOxEO the polluting emissions output from said combustion engine, η AT the efficiency of said after-treatment system, and T AT the temperature of said after-treatment system; c) a command to be given to said propulsion system is determined by minimizing said cost function of said model of the propulsion system in light of said discretized acceptable commands; and d) said determined command is applied to said hybrid propulsion system.