The aftertreatment device has a casing (10), which has an inlet opening (12) for the inflow of the exhaust gas, an outlet opening (14) for the outflow of the exhaust gas and a feed hole (16) for dispensing reactive substance to the casing. The reactive substance can be for example fuel, ammonium or urea/water solution. As an extension of the outlet opening there is a mixing tube (18) directed outwards from the casing for mixing the exhaust gas and the reactive substance. Inside the casing there is a feeding channel (20) for guiding the exhaust gas to the mixing tube. The feeding channel has an open first end extending to the outlet opening, the cross-sectional area of which first end is smaller than the cross-sectional area of the outlet opening. The wall (22) of the feeding channel has holes (24) for the inflow of the exhaust gas. Preferably, the wall of the feeding channel has at least along a part of its length a conical shape. The second end of the feeding channel can be connected to the end wall of the c