Frequent extreme heat events around the world not only pose a major threat to human health but also cause significant economic losses to the livestock industry. The existing management practices are insufficient to fully prevent heat stress with an urgent need to develop preventive medicines. The aim of this study was to develop an anti-heat stress Chinese herbal formula (CHF) via big data analysis techniques and to evaluate its anti-heat stress effect and mechanism of action via pharmacodynamic evaluation and network pharmacology analysis. Many anti-heat stress CHFs were collected from the Chinese National Knowledge Infrastructure (CNKI) database. Three alternative CHFs were obtained via unsupervised entropy hierarchical clustering analysis, and the most effective CHF against heat stress, Shidi Jieshu decoction (SJD), was obtained by screening in a mouse heat stress model. In dry and hot environments, SJD significantly improved the heat tolerance of AA broilers by 4–6°C. In a humid and hot environment, pretreatment with 2% SJD resulted in 100% survival of Wenchang chickens at high temperatures. The main active ingredients of SJD were identified as muntjacoside E, timosaponin C, macrostemonoside H and mangiferin via ultra-performance liquid chromatography/mass spectrometry (UPLC/MS) and database comparison. The active ingredients of SJD were found to target tumor necrosis factor-α (TNF-α), signal transducer activator of transcription 3 (STAT3) and epidermal growth factor receptor (EGFR). Finally, the safety of the new formulation was assessed in an acute oral toxicity study in rats. The SJDs developed in this study provide a new option for the prevention of heat stress in animal husbandry and offer new insights for further research on anti-heat stress.