The Miboshan Formation in the Middle Ordovician plays a crucial role in the sedimentary evolution of the western margin of the Ordos Basin as it represents the transition from a carbonate platform to a deep-water slope-basin environment. This study focuses on the paleoenvironment of claystone in the Middle Ordovician Miboshan Formation, located in the Ningxia Hui Autonomous Region of the Ordos Basin. The study aims to analyze the influence of sea level and salinity on rare earth elements, investigate terrigenous input and redox conditions through trace element analysis, and exemplify the coupling relationship between depositional and tectonic environments. The Miboshan Formation profile consists of thick- to thin-bedded limestones, mainly composed of lenticular calcirudite with erosion surfaces and horizontal laminae. Grayish black claystone have deformation structures and graptolite fossils. Based on the total number of rare earth elements and the trace element indexes, the seawater properties, redox degree, and terrigenous input are located in two data sets in different parts of the profile (i.e., sample 6-1 to 6-5: Concentrated in lower part, and samples 6-6 to 6-8: Concentrated in upper part), implying that they were deposited at different subaqueous uplifts. Negative Ce anomalies, La/Ce, V/Cr, and Fe3+/Fe2+ ratios indicate an anoxic condition with stratified redox structure, whereas characteristic LaN/NdN, Y/Ho, and Sr/Ba suggest deep-water affected by fresh water. The ∑REEs and Th/U ratios indicated that the study area was mainly deposited from terrigenous materials in the stable tectonic area. According to the ages of deposition, lithologic analyses, and chemical parameters, the Miboshan Formation is related to the deep water environment in a ponded basin influenced by subaqueous uplift resulting from plate subduction in an active continental margin. This study provides valuable insights into paleoenvironment and paleotectonic environments of the Miboshan Formation in the Middle Ordovician.