The invention discloses an agricultural product quality safety management system based on the Internet of things. The system comprises a main server and a sub server, wherein the main server is connected with the sub server, a printing device, a camera device, a main input device, a storage device, a firewall and a main display device, the sub server is connected with a water quality detection device, a soil detection device, a pesticide detection device, a sub input device, a sub display device, an authority authentication device, a fertilizer detection device, an air detection device and a humiture detection device, the sub server is mainly responsible for stage data detection, sampling and analysis, the stage data is generated into final detection reports which are sent to the main server, the main server is used for classifying the stage reports generated by the sub server, analyzing and processing the data acquired by the camera device, sending agricultural product detection reports to clients, sending the information to workers and generating bar codes or two-dimensional codes. The system is advantaged in that the structure is reasonable, the data has high reliability, and the system is suitable for wide popularization and application.