Device for purifying a gas coming from a casing of an internal combustion engine, comprising a separating element mounted rotating around an axis and having a coalescing medium arranged angularly around the axis, and an envelope that comprises: - at least one first peripheral wall around the separating element; - at least one second wall that extends transversally in relation to said axis and defines with said peripheral wall a cavity inside of which is housed the separating element, with the separating element delimiting an upstream zone of untreated gases communicating with the engine casing and a downstream zone of treated gases communicating with the outlet, wherein the separating element comprises two flanges (16, 17) between which the coalescing medium is fixed, and wherein the separating element is supported by a rotating support shaft in relation to which it is movable, characterised in that said device comprises a system from at least two separate parts (17, 30, 30a) and which is adapted for the driving in rotation of the separating element from the outside of the cavity by a magnetic gear between at least two magnetic bodies (31, 32; 33; 34; 35) of a first (30, 30a) of the two parts, external to said cavity, and at least two magnetic bodies (21, 22; 25) of a second of two parts, arranged inside the cavity and integral in rotation with the separating element, and in that one of said flanges (16, 17), proximal, defines an axial end of the separating element located in the vicinity of the second wall and supports or comprises the magnetic bodies of the second of the two parts, the proximal flange comprising a layer of preferably injected magnetic material, the composition of said layer having a major proportion by weight of metal powder, the layer presenting magnetised angular sectors forming said magnetic bodies (21, 22) provided with a permanent magnetization. - at least one first peripheral wall around the separating element; - at least one second wall that extends transversally in relation to said axis and defines with said peripheral wall a cavity inside of which is housed the separating element, with the separating element delimiting an upstream zone of untreated gases communicating with the engine casing and a downstream zone of treated gases communicating with the outlet, wherein the separating element comprises two flanges (16, 17) between which the coalescing medium is fixed, and wherein the separating element is supported by a rotating support shaft in relation to which it is movable, characterised in that said device comprises a system from at least two separate parts (17, 30, 30a) and which is adapted for the driving in rotation of the separating element from the outside of the cavity by a magnetic gear between at least two magnetic bodies (31, 32; 33; 34; 35) of a first (30, 30a) of the two parts, external to said cavity, and at least two magnetic bodies (21, 22; 25) of a second of two parts, arranged inside the cavity and integral in rotation with the separating element, and in that one of said flanges (16, 17), proximal, defines an axial end of the separating element located in the vicinity of the second wall and supports or comprises the magnetic bodies of the second of the two parts, the proximal flange comprising a layer of preferably injected magnetic material, the composition of said layer having a major proportion by weight of metal powder, the layer presenting magnetised angular sectors forming said magnetic bodies (21, 22) provided with a permanent magnetization.