The reduction of the effects of heat-stress phenomena on poultry health and energy conservation of poultry farm monitoring networks are highly related problems. To address these problems, we propose environmental perception Q-learning (EPQL) to prolong the lifetime of poultry farm monitoring networks. EPQL consists of an environmental-perception module and Q-learning. According to the temperature and humidity model of heat stress, an environmental-perception module determines the transmission rate, while Q-learning adjusts the transmission rate according to the success rate of packet transmission and the remaining energy. In real-world tests, our poultry farm monitoring networks used only about 8% of energy in a month. The real-time information of these monitoring networks was available on smartphones. In laboratory tests, compared with CSMA/CA (23.67 days), S-MAC (109.37 days), and T-MAC (252.79 days) under real systems with 2000 mAh battery, the battery-life performance of EPQL (436.48 days) was better. Moreover, EPQL reduces the packet loss rate by about 60% while simultaneously decreasing the average delay by about 20%. Generally, based on the framework of EPQL, the implemented temperature and humidity model of heat stress for poultry could be replaced by other models to extend its applicability range.