Mesophilic and thermophilic anaerobic digestion (AD) tests were carried out to study the conversion of pig manure (PM) after a brief heat pre-treatment (HPT, boiling for 10 min), mainly focusing on the AD microbial variation. A continuous AD lasting 60 d was first conducted to obtain domesticated sludge used for the subsequent BMP test and microbial analysis. The results showed that HPT could promote the formation and conversion of AD liquid products, increasing biogas production. The methane potentials of the HPT PM under mesophilic and thermophilic AD (MAD and TAD) were 154.81 and 311.92 mL/g VS respectively, which were 10.09 % and 29.71 % higher than those of the respective controls. 16S rRNA sequencing analysis revealed that HPT and TAD weakened the bacterial diversity while increasing the archaeal diversity, and HPT had a greater impact on the microbial structure of MAD. By digesting HPT PM, phyla Proteobacteria and Fibrobacterota bacteria were significantly enriched in MAD, while only the order Limnochordia was up-regulated in TAD. These communities are involved in hydrolysis and fiber decomposition. The archaeal genera Methanobacterium, Methanosarcina, Methanoculleus, and Methanomassiliicoccus increased significantly in MAD, linking with the enhancement of community methanogenic function. At the same time, these methanogens were all dominant in the TAD reactors, suggesting that HPT enriched some TAD methanogens in the MAD reactor. This finding breaks the traditional perception that the fermentation temperature can strictly classify methanogens. In conclusion, HPT could help projects operating at moderate temperatures to improve the microbial community structure and function.