Xuanwei ham is a traditional fermented meat product in China with a unique production process and excellent-quality reputation at home and abroad. To reveal the microbial community succession of Xuanwei ham at different post-ripening times (W1-4) and its relationship with flavour formation, the microbial community, free amino acids, and volatile flavour compounds (VOCs) were analysed by high-throughput sequencing, liquid chromatography (LC), and gas chromatography–mass spectrometry (GC-MS), respectively. A total of 25 free amino acids were detected, among which W3 contained the fewest, and most were generally lower than in hams in the other three years. Fifty-nine VOCs were detected, among which 17 were esters, and the highest ester content was found in W4. Analysis of the bacterial community composition revealed that the bacterial community composition of ham samples from W3 and other years differed greatly, and at the gate level, the dominant bacterial group of Xuanwei ham from different years was Pseudomonadota. At the genus level, the most abundant genera in W1, W2, and W4 were all dominated by Sarocladium, Klebsiella, and Vibrio, with Klebsiella being the most abundant in W1. The most abundant genus in W3 was Vibrio, and the second most dominant genera were Sarocladium and Gammaretrovirus. In short, this study provides a theoretical basis for the storage, quality, and improvement of Xuanwei ham.