A hybrid powertrain unit for a motor vehicle, comprising: - an internal-combustion engine; and - a gearbox device including: - at least one primary shaft, that can be connected to the crankshaft of the motor vehicle by means of a clutch device, - at least one secondary shaft, the axis of which is parallel to and at a distance from by the axis of said primary shaft and which carries an output pinion; - a plurality of pairs of gears (I1, I2, II1, II2, III1, III2, IV1, IV2, V1, V2, VI1, VI2) corresponding to a plurality of forward gear ratios (I, II, III, IV, V, VI), in which the gears of each pair are one rigidly connected in rotation with respect to one of said primary and secondary shafts (3, 7) and the other freely rotatable with respect to the other of said primary and secondary shafts; and - a plurality of gear-selection devices (S1/2, S3/4, S5/6) for coupling in rotation each of said freely rotatable gears with the shaft on which is mounted, said unit further comprising: - a differential, having a first crown wheel meshing with said output pinion of said secondary shaft of the gearbox device; and - an electrical machine designed to operate both as electric motor and as electrical generator and having a casing rigidly connected to the casing of said differential, and a shaft connected by means of a transmission to a second crown wheel of said differential, - an engagement device set in said transmission for connection between the shaft of the electrical machine and the aforesaid second crown wheel of the differential; and - means for actuating said engagement device, said unit being characterized in that the electrical machine has a shaft connected to the shaft of the internal-combustion engine at the end of the latter opposite to the one connected to the gearbox device. - an internal-combustion engine; and - a gearbox device including: - at least one primary shaft, that can be connected to the crankshaft of the motor vehicle by means of a clutch device, - at least one secondary shaft, the axis of which is parallel to and at a distance from by the axis of said primary shaft and which carries an output pinion; - a plurality of pairs of gears (I1, I2, II1, II2, III1, III2, IV1, IV2, V1, V2, VI1, VI2) corresponding to a plurality of forward gear ratios (I, II, III, IV, V, VI), in which the gears of each pair are one rigidly connected in rotation with respect to one of said primary and secondary shafts (3, 7) and the other freely rotatable with respect to the other of said primary and secondary shafts; and - a plurality of gear-selection devices (S1/2, S3/4, S5/6) for coupling in rotation each of said freely rotatable gears with the shaft on which is mounted, - a differential, having a first crown wheel meshing with said output pinion of said secondary shaft of the gearbox device; and - an electrical machine designed to operate both as electric motor and as electrical generator and having a casing rigidly connected to the casing of said differential, and a shaft connected by means of a transmission to a second crown wheel of said differential, - an engagement device set in said transmission for connection between the shaft of the electrical machine and the aforesaid second crown wheel of the differential; and - means for actuating said engagement device,