With the aim to understand the effect of fermentation time on volatile composition of Pixian bean sauce, two raw materials, namely fermented chili and raw beans, and Pixian bean sauces fermented for 3, 1 years or 3 months were analyzed for volatile composition by headspace solid-phase microextraction (HS-SPME) coupled to GC-MS. Added together, 66 compounds were identified in both materials of Pixian bean sauce, including alcohols (5), esters (24), acids (2), aldehydes (5), hydrocarbons (23), phenols (4), furans (1), and nitrogen-containing compounds (2). Added together, 88 compounds were identified in Pixian bean sauces with different fermentation time, including alcohols (7), esters (20), acids (3), aldehydes (9), hydrocarbons (35), phenols (6), ketones (4), and nitrogen-containing compounds (3). The compounds simultaneously found in the above 5 samples were benzaldehyde, benzeneacetaldehyde, (Z)-3,7-dimethyl- 1,3,6- octatriene, 3,7-dimethyl-1,6-octadien- 3-ol, 2,6,6-trimethyl-2-cyclohexene-1,4-dione, 4-ethylguaiacol, ethyl hexadecanoate, and so on. These results can offer valuable reference for the study of fermentation process and flavoring preparation of Pixian bean sauce.