This document describes a proposed system to prevent fire accidents in trains using Internet of Things (IoT) technology. Sensors such as temperature, humidity, and smoke detectors would be installed in train compartments to detect fires. If a fire is detected, the system would activate fire extinguishing methods like releasing a fire extinguishing ball and activating sprinklers. It would also send emergency alerts to the train operator and fire departments using a NodeMCU microcontroller and IFTTT application to notify them of the fire so they can respond quickly. The goal is to quickly detect and control fires to minimize damage and save lives through an automatic fire detection and response system connected by IoT.