This paper discusses the volcanic influence on the mineralogical and elemental geochemistry of No. 6 coal from Nanyangpo Mine in the Datong coalfield, north China. Sixteen samples (14 coal and 2 partings) were analyzed by different geochemical methods. The results revealed that the No. 6 coal is a medium–high volatility, highly calorific, bituminous coal with a low-ash and medium-sulfur content. The minerals mainly consisted of kaolinite, calcite, dolomite, and pyrite. In addition, traces of apatite, sphalerite, and anatase were also found. Calcite, dolomite, and pyrite in the coal samples were mainly derived from epigenetic hydrothermal solutions, whereas kaolinite and apatite originated from volcanic ash. Harmful trace elements including Pb, Cu, Mo, Tl, and Hg in the No. 6 coal samples were higher than those of common global coals. These harmful elements mainly occurred in sulfide minerals, which were probably influenced by hydrothermal inputs.