Aiming at the problem of greenhouse environmental information collection in agricultural production, this paper designs a greenhouse monitoring system based on STM32 microcontroller. The system uses STM32F103 series MCU as the main control unit, which is used to receive the detection results of the sensor. The host computer software displays and processes the monitoring data. The temperature and humidity sensors monitor air temperature and humidity. The capacitive soil moisture detection sensor monitors soil moisture. The carbon dioxide sensor monitors the concentration of carbon dioxide. The photosensitive sensor monitors light intensity. This design has low hardware cost and high data acquisition accuracy, which can be applied to the actual greenhouse agricultural production and has wide practicability.