Mineral matter, including minerals and non-mineral elements, in coal is of great significance for geological evolution, high-value coal utilization, and environment protection. The minerals and elemental geochemistry of Late Permian coals from the M8 coal seam, Shihao mine, Songzao coalfield in Chongqing, were analyzed to evaluate the sediment source, sedimentary environment, hydrothermal fluids, and utilization prospects of critical metals. The average total sulfur (4.21%) was high in coals, which mainly exists in the forms of pyritic sulfur. Kaolinite, pyrite, calcite, quartz, illite and illite/smectite (I/S) mixed layers, and anatase predominated in coals, with trace amounts of chlorite, ankerite, and siderite. Epigenetic cell- and fracture-filling pyrite, veined calcite, and ankerite were related to hydrothermal fluids and/or pore water after the diagenesis stage. Compared to the world’s hard coals, As and Cd are enriched in the Shihao M8 coals, and Li, Cr, Co, Zr, Mo, Pb, and Tb are slightly enriched. These high contents of sulfophile elements may be related to seawater intrusion. The terrigenous clastics of the Shihao M8 coals originated from the felsic–intermediate rocks atop the Emeishan Large Igneous Provinces (ELIP) (Kangdian Upland), while the roof and floor samples were derived from Emeishan high-Ti basalt. Through the combination of sulfur contents and indicator parameters of Fe2O3 + CaO + MgO/SiO2 + Al2O3, Sr/Ba and Y/Ho, the depositional environment of peat swamp was found to be influenced by seawater. Although the critical elements in coal or coal ash did not reach the cut-off grade for beneficial recovery, the concentration of Li and Zr were high enough in coal ash.