The content, distribution, and origin of aluminum, lithium, gallium, and rare earth elements (REEs) in the Permo-Carboniferous coal of the Datong coalfield, China, were investigated using optical microscopy and field-emission scanning electron microscopy in conjunction with energy-dispersive X-ray spectrometry, X-ray powder diffraction, and inductively coupled plasma mass spectrometry. The Permo-Carboniferous coal of the Datong coalfield had a high volatile bituminous rank (Ro,max = 0.72% on average), and low sulfur and medium ash contents (0.58% and 25.74% on average, respectively). The main minerals in the Datong coal included kaolinite, boehmite, muscovite, calcite, dolomite, siderite, aluminum phosphate, and quartz. Of these, kaolinite, boehmite, calcite, quartz, and phosphates mainly occurred as cell fillings, indicating an authigenic origin. Compared to hard coals worldwide, the Datong coal is enriched in SiO2 (49.12%; up to 89.93%), Al2O3 (38.88%; up to 71.37%), Li (67 μg/g; up to 354.1 μg/g), Ga (18.1 μg/g; up to 70.2 μg/g), Y (20.8 μg/g; up to 46.1 μg/g), La (34 μg/g; up to 158.5 μg/g), Ce (61.3 μg/g; up to 353.8 μg/g), Tb (0.7 μg/g; up to 3.0 μg/g), Er (2.3 μg/g; up to 5.7 μg/g), and Yb (2.2 μg/g; up to 5.4 μg/g). High-alumina coal (Al2O3 content in ash > 40%) occurred in the northern and southern parts of the coalfield. In the No. 3–5 coal seam, the areas of Li enrichment were located in the north and middle of the coalfield. In the Tashan and Chaigou mines, the Ga content exceeded 30 μg/g. An area of REEs enrichment (REEs content > 300 μg/g) was identified in the Tashan and Xiaoyu mines. In the No. 3–5 coal seam, the REEs distribution pattern showed a wide and gentle “V” curve with a high left and a low right limb. These seams were characterized by a marked depletion in Eu (δEu = 0.51) and a weak negative Ce anomaly (δCe = 0.95). In the No. 3–5 coal seam, Al, Li, Ga, and REEs mainly occurred in kaolinite. Boehmite and phosphate minerals were the main carriers of Ga and REEs, respectively. The enrichment in Al-Li-Ga-REEs in the No. 3–5 coal seam was mainly influenced by the sedimentary provenance and the environment of coal accumulation. The sediment sources were oxidized bauxite in the weathering crust of the Benxi Formation and the Middle Proterozoic moyite of the Yinshan Oldland to the north and west of the coalfield. Al, Li, Ga, and REEs were transported from the source region as solutes and colloids, and they became enriched in the swamp facies of the delta plain. The Li, Ga, and REEs contents gradually increased from the bottom to the top of the Permo-Carboniferous coal seam. This increase is mainly attributed to the weak influence of seawater. The marked enrichment in heavy REEs at the bottom of the No. 5 coal seam may be related to marine transgression.