To reveal the impact of thermal hydrolysis pretreatment (THP) temperature on the unclear mechanisms of volatile fatty acids (VFAs) production, four groups were established with different temperatures (100, 120, 140 and 160 °C), and high throughput sequencing technology was utilized. The results indicated that the optimal VFAs production occurred at 140 °C. Moreover, as the THP temperature increased, the proportion of acetic acid also increased, accounting for 10.8% to 26.7% of the VFAs, compared to only 4.9% in the control group. Mechanism investigations revealed that THP facilitated the hydrolysis and release of biodegradable organic matter. Moreover, the abundance of VFAs production and hydrolytic microorganisms and related metabolic functional genes expression were evidently improved by THP. Overall, this study deepens the understanding of the mechanisms through which different THP temperatures stimulate the production of VFAs through acidogenic fermentation, providing technical support for future THP application in sludge treatment.