The invention relates to the technical field of electrical accessories, in particular to a distribution box capable of automatically dissipating heat. The distribution box comprises a box body and a box cover on the box body, a fan is arranged in the box body, and a plurality of heat dissipation holes protruding from the surface of the box cover are formed in the position, close to a heat source,of the box cover; each heat dissipation hole is provided with a fixing plate and a moving plate capable of automatically returning, an electromagnet is fixed to the side, toward the inner wall of thecorresponding heat dissipation hole, of each moving plate, an air bag is fixed to the inner wall of each heat dissipation hole, and an iron block attracting the corresponding electromagnet during heating expansion of the air bag is fixed to the air bag; an infrared emitter and an infrared receiver which can be covered by the corresponding moving plate are arranged on the inner wall of each heat dissipation hole, and each infrared receiver is used for receiving the infrared rays of the corresponding infrared emitter; the distribution box further comprises a controller, and the controller is used for controlling the fan to improve the rotational speed based on the signals of the infrared receivers. According to the distribution box, while the moving plates are adsorbed to the air bags to enlarge the heat dissipation holes, increase of the rotational speed of the fan is controlled to accelerate heat dissipation, and more heat is conducted out of the distribution box with the air by the enlargement of the heat dissipation holes, so that the heat dissipation effect is better.