To improve environmental quality in enclosed piggeries, a monitoring and control system was designed based on a track inspection robot. The system includes a track mobile monitoring platform, an environmental control system, and a monitor terminal. The track mobile monitoring platform consists of three main components: a single-track motion device, a main box containing electronic components, and an environmental sampling device. It is capable of detecting various environmental parameters such as temperature, humidity, NH3 concentration, CO2 concentration, light intensity, H2S concentration, dust concentration, and wind speed at different heights below the track. Additionally, it can control on-site environmental control equipment such as lighting systems, ventilation systems, temperature control systems, and manure cleaning systems. The networked terminal devices enable real-time monitoring of field equipment operating status. An adaptive fuzzy PID control algorithm is embedded in the system to regulate the temperature of the piggery. Field tests conducted on a closed nursery piggery revealed that the system effectively controlled the maximum temperature range within 2 °C. The concentrations of CO2, NH3, and PM2.5 were maintained at a maximum of 1092 mg∙m−3, 16.8 mg∙m−3, and 35 μg∙m−3, respectively. The light intensity ranged from 51 to 57 Lux, while the wind speed remained stable at approximately 0.35 m∙s−1. The H2S concentration was significantly lower than the standard value, and the lowest relative humidity recorded was 18% RH at high temperatures. Regular humidification is required in closed piggeries and other breeding places when the system does not trigger the wet curtain humidification and cooling function, as the relative humidity is lower than the standard value. By controlling the temperature, the system combined with a humidification device can meet environmental requirements. The control method is simple and effective, with a wide range of applications, and holds great potential in the field of agricultural environmental control.