On the Latvian railway 66% of derailments occurred while sorting on marshalling humps, 24% of them took place during sorting on marshaling yards, 6% of derailments happened at ways repairing and 4% of such type of accidents occurred on span. The work contains a theoretical studying of freight cars vibrations while a group of the freight cars are under braking on a moderator-coolant. The purpose is to discover possible reasons of derailment. The corresponding analytical description is presented. Groups, consists of four, six and ten carriages were considered. We were varying the longitudinal speed of the group and a duration of brakes applying, as well as types of the freight carriages. The solution of the differential equations for the groups of carriages confirms an assumption, in accordance to which a contact between a wheel of a carriage and the rail may be lost due to the oscillations, induced by braking. The results allow to present recommendation for choosing the safe regime of braking in order to avoid the derailment.