The invention discloses an obstacle clearing device with a detection mechanism for rail transit, relates to the technical field of rail transit, and aims to solve the problem that sundries on a rail influence driving safety. The device comprises a connecting steel plate fixed to the bottom of a carriage of a head vehicle, and an electronic system placed in a cab. A connecting beam is fixed to theouter wall of the bottom of the connecting steel plate through bolts, an anti-contact steel plate is fixed to the outer wall of the connecting beam through bolts, an anti-contact device is arranged onthe inner wall of the anti-contact steel plate, and an obstacle removing mechanism is arranged on one side of the anti-contact device. According to the invention, the obstacle clearing mechanism is arranged; when there are sundries on the rails, striking rubber can strike the sundries away from the rails, and the striking rubber, the fixed steel plate and the curved steel plate are all in curvedsurface design, so that when the sundries strike the striking rubber, the direction of reaction force generated by the striking rubber to the sundries deviates to the inner side, the sundries finallyfall between the two rails, and the safety of nearby personnel is guaranteed.