Rail accidents have been increased due to the flood flowing across the railway tracks. The authors are proposing a flood detection system to overcome such accidents. Here, whenever they detect that there is an overflow over tracks, they will send a signal to the train through zigbee which will automatically stop the train and also send messages to higher authorities of south central railway. An embedded system can be defined as a computing device that does a specific focused job. Appliances such as the air-meet the specific requirement of the application along with the embedded software that is executed by the processor for meeting that specific requirement.