A system for recovering and controlling thermal energy in an electric vehicle with an electrochemical generator, said electrochemical generator being chosen among the group comprising batteries and fuel or hybrid cells, said control system comprising an air-conditioning circuit of an HVAC system in the passenger compartment of the vehicle, in which a fluid circulates, said air-conditioning circuit comprising at least one external condenser/evaporator, a compressor, an internal condenser for heating the passenger compartment, a first expansion valve provided downstream of the internal condenser between the internal condenser and the external condenser/evaporator, an internal evaporator for cooling the passenger compartment, a second expansion valve provided upstream of the internal evaporator, between the external condenser/evaporator and the internal evaporator, said thermal energy recovery and control system comprising a first circuit for heating or recovering thermal energy from the electrochemical generator and a second circuit for cooling or recovering thermal energy from the electrochemical generator in which said fluid circulates, a plurality of valves (18, 20, 21, 24, 28, 32, 36, 37, 38, 39, 41) arranged so as to be able to switch the air conditioning circuit into communication with one or the other of the first heating circuit and of the second cooling circuit on the electrochemical generator, and means of controlling said valves (18, 20, 21, 24, 28, 32, 36, 37, 38, 39, 41) arranged to allow, according to the temperature of the electrochemical generator, the fluid from the air conditioning circuit to circulate in the first heating circuit to heat the electrochemical generator or recover thermal energy for heating from the electrochemical generator, as well as the fluid from the air conditioning circuit to circulate in the second cooling circuit to cool the electrochemical generator or recover thermal energy for cooling from the electrochemical generator, said first heating circuit on the electrochemical generator comprising a first line for supplying fluid to a heat-transfer element associated with the electrochemical generator, said first supply line being connected to a first outlet provided between the compressor and the internal condenser, via a first valve controlled by the control means and which is further connected to a first inlet of a second valve in the heating circuit on the electrochemical generator up to the heat transfer element on the electrochemical generator, and a first line for draining fluid from the heat transfer element, which is connected to a first inlet provided between the internal condenser and the first expansion valve via a third valve and via a fourth valve connected to the third valve controlled by the control means, said second cooling circuit on the electrochemical generator comprising a second line for supplying fluid to a heat transfer element associated with the electrochemical generator via a second inlet of the second valve, said second fluid supply line being connected to a second outlet provided between the second expansion valve and the internal evaporator via a fifth valve controlled by the control means, and a second fluid drainage line from the heat transfer element, which is connected to a second inlet provided downstream of the internal evaporator via a sixth valve controlled by the control means, between the internal evaporator and the compressor, a seventh valve being provided between the external condenser/evaporator and the sixth valve and the second expansion valve, characterised in that the thermal energy recovery and control system further comprises at least one electric motor, and at least one electronic circuit mounted in a parallel arrangement with the electrochemical generator in communication with the first heating circuit or with the second cooling circuit so as to be capable of recovering thermal energy for heating or for cooling, in that a second outlet of the second valve is connected to an inlet of an eighth valve, with a first outlet of this eighth valve connected to the portions of the line on at least the electric motor, while a second outlet of the eighth valve is connected to the portions of the line on at least the electronic circuit, and in that outlets of at least the electric motor, and of at least the electronic circuit are connected to inlets of a ninth valve, the outlet of which is connected to an inlet of a connecting valve, the other inlet of which is connected to the heat transfer element on the electrochemical generator, and in that an outlet of this connecting valve is connected to a first inlet of a tenth valve, a first outlet of which is the second fluid drainage line on the heat transfer element, and a second outlet of which is the first fluid drainage line on the heat transfer element.