To understand the sedimentary paleoenvironmental changes in the marine-terrestrial strata of the Upper Carboniferous Taiyuan Formation in the Datong Basin of North China, we generated mineralogical and geochemical data of the Tashan and Emaokou mines in the eastern Datong Basin. The study strata vertically comprise kaolinitic claystones in the upper and lower parts and calcareous mudstones in the middle. The kaolinitic claystones are primarily composed of kaolinite and quartz, with a small amount of illite, feldspar and siderite, whereas the calcareous mudstones comprise mixed-layer illite/smectite (I/S) clay and carbonate minerals, with a minor amount of quartz, kaolinite, feldspar, and siderite. The paleosalinity indicators (B/Ga, Sr/Ba, and paleontological detritus) indicate that kaolinitic claystones are formed in freshwater, whereas calcareous mudstones are formed in marine water. The redox-sensitive trace element ratios (U/Th and Ni/Co) and trace metal enrichment factors (MoEF and UEF) indicate that kaolinitic claystone and calcareous mudstone formed under oxic and anoxic–suboxic conditions, respectively. Clay assemblages, chemical alteration index (CIA), and the Sr/Cu ratios show that kaolinitic claystones and calcareous mudstones were deposited under hot, humid, intense weathering conditions and warm, humid, and moderately weathering conditions, respectively. Based on these data and combined with previous studies, we conclude that transgressive events caused the changes in sediments in the study area, and the occurrence of transgressive events is related to the global glacio-eustatic fluctuation and paleoclimate changes during the Late Paleozoic Ice Age (LPIA). Our results are essential for unraveling the relationship between the study area and global paleoenvironmental changes during the LPIA.