Mianning ham, a traditional Chinese dry-cured ham, is protected by national geographical indications. To understand the surface and internal flavor composition and microbial community structure of Mianning ham, solid phase microextraction-gas chromatography (SPME-GC-MS) technology and Illumina high-throughput sequencing were utilized. The results showed that a total of 60 flavor substances were identified in the hams. Forty-nine kinds of flavorings were identified on the surface, including 14 aldehydes, 6 ketones, 10 alcohols, 5 esters, 7 hydrocarbons, 5 acids, and 2 other compounds. Thirty-six kinds of internal flavorings were identified, including 13 aldehydes, 4 ketones, 6 alcohols, 3 esters, 5 hydrocarbons, 4 acids and 1 other type. Decanal (34.91 μg/g) was the most prevalent compound on the surface, followed by n-hexanol (24.99 μg/g), n-hexanal (20.20 μg/g), and n-octyl (16.14 μg/g). n-Hexanal (20.74 μg/g) was the most common compound internally, followed by non-aldehyde (5.70 μg/g), 1-octene-3-alcohol (3.54 μg/g), and inverse-2-octenal (2.77 μg/g). Penicillium lanosum, Penicillium nalgiovense, Debaryomyces hansenii, Staphylococcus equorum, and Erwinia tasmaniensis were isolated from the surfaces of the hams by the traditional culture method. By Illumina high-throughput sequencing, three fungal phyla were identified. Ascomycota was the dominant phylum followed by Basidiomycota. At the genus level, 11 fungi were identified, of which Aspergillus was the dominant fungus, followed by Penicillium and Wallemia. These findings provide fundamental knowledge regarding the microorganisms and flavor compounds in Mianning ham, which will help industrial processors develop effective strategies for standardizing quality parameters.