The invention belongs to the field of flat cars, and particularly relates to a rail flat car with the locking function. The problem that when a traditional flat car is braked, under the inertia effect, the flat car continuously slides along with a rail is solved. The rail flat car comprises a flat car body and a rail arranged on the bottom of the flat car body; the bottom of the flat car body is connected with a rotating shaft through a bearing pedestal, the two ends of the rotating shaft are fixedly sleeved with rollers, mounting grooves formed in the bottom of the flat car body are formed inthe tops, close to each other, of the two rollers, driving mechanisms are arranged on the inner side walls of the sides, close to each other, of the two mounting grooves, the ends, away from each other, of the two driving mechanisms are connected with a push plate in sliding connection with the inner side walls of the tops of the mounting grooves, locking mechanisms are arranged on the bottoms ofthe push plates in a collision manner, and the sides, away from each other, of the two push plates are provided with push rods. The brake effect on the flat car is achieved, the flat car can be rapidly braked, during brake, the flat car and the rail are clamped, and the phenomenon that when the flat car is parked, due to the inertial effect, the flat car continuously slides along with the rail isavoided.