The invention discloses an automatic protective device of an optoelectronic device. The automatic protective device comprises a box, a base plate is arranged at the bottom of the box, a plurality of insertion rods are fixedly connected to the top of the base plate, connecting grooves corresponding to the insertion rods are formed in the bottom of the box, the insertion rods are in sliding connection with the inner side wall of the connecting grooves, the insertion rods are sleeved with first springs, the two ends of the first springs are connected with the box and the base plate, the top of the base plate is fixedly connected with a joining rod, a control block is fixedly connected to the top of the joining rod, and the side wall of the box is provided with a first sliding groove corresponding to the control block. According to the automatic protective device, the base plate extrudes the first springs to protect the box, in addition, the base plate supports a side plate open through asupporting rod by means of cooperation of the joining rod and the control block, secondary collision caused after box falling is avoided, the self-protection function is achieved, box damage is avoided, and use by people is facilitated.