Inductively coupled plasma mass spectrometry, inductively coupled plasma optical emission spectroscopy, hydride generation-atomic fluorescence spectrometry, emission spectrometry, X fluorescence spectrometry, and X-ray diffraction were employed to study the geochemistry and mineralogy of coal gangues from Nos. 2, 3, and 8 coal seams of the Du’erping coal mine, Xishan coalfield, Taiyuan, Shanxi Province. The study revealed that compared with the sedimentary cover, upper continent crust, Carboniferous-Permian coal from North China, as well as most coal in China, coal gangues from Nos. 2 and 3 coal seams are rich in Li, Be, Sc, Cr, Cu, Ga, Ba, Th, Nb, Cd, Pb, Ta and rare-earth elements, and coal gangues from No. 8 coal seam are rich in Li, Sc, V, Cr, Ga, U, and rare-earth elements. Compared with the Carboniferous-Permian coal from North China and most coal in China, coal gangues from Nos. 2, 3 and 8 seams are rich in Rb, V, Cs and Sr. Therefore, The Du’erping coal gangues in the Xishan coalfield are rich in most hazardous trace elements and rare-earth elements, wherein the contents of Ga and Li reach the industrial grade and have significance for industrial utilization. On the whole, coal gangues of the Shanxi Formation from the Permian are rich in more trace elements than those of the Carboniferous Taiyuan Formation. The distributions of REE show obviously dipping rightwards with negative Eu anomalies. The contents of rare-earth elements in the three seams are quite different. All of the above indicate that the source of the rare-earth elements is terrigenous debris. Minerals in No. 2 seam identified by X-ray diffraction mainly include quartz, kaolinite, in addition to calcite, pyrite, apatite, epidote, and epsomite. No. 3 seam mainly contains quartz, kaolinite, in addition to a small amount of sodium feldspar, calcium nitrate, iron ore, gypsum, and vivianite. No. 8 seam mainly contains kaolinite, dickite, quartz, illite, and a small amount of hematite and U. The correlations between major elements and trace elements in coal gangues of the Du’erping coal mine analyzed by using SPSS (Statistical Product and Service Solutions) indicate that the trace alkali elements and rare-earth elements occur mainly in such clay minerals as kaolinite.