Coals are highly enriched in critical elements (rare earth elements, etc.), containing much information of paleoenvironmental and paleoclimatic during deposition. The Jurassic period is a significant coal-forming period in the world. The Yan’an Formation in the Ordos Basin in north China is among the largest Middle Jurassic coal fields of the world. The purpose of this study is to investigate the geochemical characteristics of Middle Jurassic Aalenian coals of Ordos Basin and their paleoclimate significance. Sixty-two coal samples were collected from two coal mines in the Dongsheng area in the northeast Ordos Basin. The major and trace elements in the coal samples were analyzed using X-ray fluorescence (XRF) and inductively coupled plasma-mass spectrometry (ICP-MS). The main oxides in the Yan’an coals are SiO2 and CaO. In comparison with average values for China, the coals from the Ordos Basin have a slight enrichment of CaO and MgO. Strontium and Mo values are also slightly enriched. Yttrium and rare earth elements are depleted in the coals, with a range of 8–269 μg/g (average = 48.5 μg/g; on an ash basis). The coals in the Yan’an Formation have a negative Eu anomaly, suggesting that the peat bog had a stable terrigenous material supply during the coal-forming period. The continental saline water system and oxygen-suboxygenic environment were inferred from the Sr/Ba, U/Th, Ni/Co, Sr/Cu. The Sr/Cu and Sr/Ba data of Yan’an Formation coal seams in the Ordos Basin also indicate climate change from a relatively arid condition to a more humid climate, which is consistent with change of marine environment during the Aalenian. Global cooling during the Aalenian may have triggered strengthened moisture transport by westerlies in mid-latitude inland Asia, and therefore a humid climate in the Ordos Basin.