Recuperative thickening can intensify anaerobic digestion to produce more biogas and potentially reduce biosolids odour. This study elucidates the effects of sludge shearing during the thickening process on the microbial community structure and its effect on biogas production. Medium shearing resulted in approximately 15% increase in biogas production. By contrast, excessive or high shearing led to a marked decrease in biogas production, possibly due to sludge disintegration and cell lysis. Microbial analysis using 16S rRNA gene amplicon sequencing showed that medium shearing increased the evenness and diversity of the microbial community in the anaerobic digester, which is consistent with the observed improved biogas production. By contrast, microbial diversity decreased under either excessive shearing or high shearing condition. In good agreement with the observed decrease in biogas production, the abundance of Bacteroidales and Syntrophobaterales (which are responsible for hydrolysis and acetogenesis) decreased due to high shearing during recuperative thickening.