The invention discloses a fireproof door with an automatic fire extinguishing function. The fireproof door with the automatic fire extinguishing function comprises a door body, a box body, a carrying roller and a motor, a storage cavity, a carrying cavity and a control cavity are formed in the box body, the storage cavity communicates with the carrying cavity through a liquid inlet channel, a liquid outlet groove is formed in the door body, the liquid outlet groove is connected with a fire extinguishing spray head, the carrying roller is rotationally connected into the carrying cavity and driven by the motor, and a carrying groove is formed in the carrying roller. During use, the storage cavity is filled with fireproof foam, when a fire occurs, the motor works to drive a driving wheel to rotate, the driving wheel drives a transmission wheel to rotate through a belt, accordingly, the carrying roller rotates, when the carrying groove above the carrying roller is aligned with the liquid inlet channel, the fireproof foam in the storage cavity enters the carrying groove, along with rotation of the carrying roller, when the carrying groove containing the fireproof foam moves to the lower portion and is aligned with a liquid outlet hole, the fireproof foam in the carrying groove enters the liquid outlet groove through the liquid outlet hole and then is sprayed out from the fire extinguishing spray head, and fire extinguishing operation is carried out.