The invention discloses a goods storage machine with an air quality detector. The goods storage machine comprises a cabinet body, a two-dimensional code scan control device and an advertising machine, the advertising machine is arranged on the back of the cabinet body, multiple goods storage grids are distributed on the front side of the cabinet body from the bottom to the top, and the lowermost goods storage grid is the largest, the uppermost goods storage grid is the smallest, cabinet doors and cabinet door electronic locks are arranged on each goods storage grid; the advertising machine, comprises a box body, a left motor, a left winding shaft, a right motor, a right winding shaft and an advertising canvas; the advertising machine further comprises an air quality detector and a display screen, the air quality detector is located in the box body, the display screen is mounted on the upper part of the box body, and the air index detection information is transmitted by the air quality detector to the display screen for displaying. The air quality detector can simultaneously detect formaldehyde in the air, the PM2. 5, TVOC and temperature and humidity and other air indices.