The invention relates to an air quality detector, which contains an instrument housing, and is characterized in that a detection cavity is arranged inside the instrument housing, a measurement sensor is arranged inside the detection cavity, a fan is arranged inside the detection cavity, a wind inlet is arranged on the front surface of the instrument housing, a wind outlet is arranged on the back surface, the instrument housing is connected to a power supply base, the front surface of the instrument housing is provided with a display screen and operation buttons, the instrument housing is provided with a light sensing sensor, the back surface of the instrument housing is provided with a battery box, a storage battery is arranged inside the battery box, the power supply base is provided with a snapping and connecting groove for snapping the bottom portion of the instrument housing in a connecting manner, and electrodes are arranged on the bottom portion of the instrument housing and inside the snapping and connecting groove. According to the present invention, the air quality detector has two use ways, wherein the instrument housing part can be used in a hand-held manner, and the instrument housing part can be snapped inside the power supply base in the connecting manner so as to be used in a fixed manner for a long time; and the whole detector can be automatically closed in the absence of light.