Occurrence characteristics, internal morphology patterns, size variations and trace elements contents for framboidal pyrite in the sandstone of middle Jurassic Zhiluo Formation hosting U deposit in the northern Ordos Basin collectively demonstrate three types of framboids: (i) Py1 is the synsedimentary origin, characterized by the close association with clay minerals, equal-sized microcrystals with globular or octahedral shape, the diameter of framboids and microcrystals ranging from 2.1 to 9.3 µm (mean = 5.9 µm) and from 0.1 to 1.4 µm (mean = 0.5 µm), respectively, and relatively low trace element contents (mean = 0.83 wt% of Co, Ni, As, Mo in total); (ii) Py2 is the early diagenetic origin, characterized by equal-sized pyritohedral microcrystals while other substance also occurs within the framboid, or non-uniform size and morphology of microcrystals with the diameter of framboids and microcrystals ranging from 7.3 to 26.3 µm (mean = 11.8 µm) and from 0.3 to 1.9 µm (mean = 0.8 µm), respectively, and similar trace element compositions with Py1; and (iii) Py3 is the U ore-stage origin, characterized by equal-sized cubic microcrystals in the loosely packed pattern with U-bearing minerals filling between microcrystals, the diameter of framboids and microcrystals ranging from 7.6 to 27.4 µm (mean = 15.9 µm) and from 0.7 to 3.2 µm (mean = 1.5 µm), respectively, and the highest trace element contents (mean = 1.07 wt% of Co, Ni, As, Mo and Se in total). During mineralization, Py1 and Py2 are dissolved by the interlayer oxidation fluid, providing S source and trace elements for the precipitation of Py3 with larger diameter. Its strong reducing ability, large specific surface area and abundant internal porosity facilitate the fixation of U in the interstices of Py3 through reduction or adsorption. Negative sulfur isotope compositions suggest biogenic redox processes for U mineralization. The formation and transformation relationship of different stages of framboidal pyrite indicates the complex evolution process of synsedimentary, early diagenetic and U ore-forming fluids.