The invention relates to an electric heating device for a rail vehicle and the rail vehicle. The electric heating device comprises a cover case, wherein an electric heating element is arranged inside the cover case, the cover case is hung under a seat, a heat insulation layer is arranged on the inner wall of a top plate of the cover case, and ventilation openings are respectively formed in four side plates and a bottom plate of the cover case. The electric heating device is hang under the seat, the structure is compact, the space in the vehicle is not occupied, the integral attractive appearance in the vehicle is not influenced, in addition, the four side surfaces and the bottom surface of the electric heating device are respectively provided with the ventilation openings, and the air inlet from the bottom and the air outlet from the four side surfaces are realized, so that the air convection effect of the electric heating device is better, heat can be more easily radiated into the vehicle, the heat radiation efficiency is high, meanwhile, through the arrangement of the heat insulation layer, the too-high temperature of the seat is effectively avoided, and the taking comfort is ensured.