The Upper Jurassic, Cotton Valley Limestone was deposited on a mature ramp where monotonous, regional slopes were punctuated by salt-generated structures and basement topography. The strandline and the crests of paleobathymetric highs were blanketed by oolitic and palletoidal grainstones. The ratio of grainstones to mudstones increases in the upper Cotton Valley, reflecting a regional shallowing phase. Thinner, shoaling-upward sequences are present but they do not correlate easily, especially from basement highs to salt domes, probably because salt movement occurred during deposition of Cotton Valley rocks. The complex diagenetic history of the Cotton Valley, inferred from cross-cutting features observed in thin section and from trace-element and stable-isotope content, includes the origin of “chalky” microporosity, especially in ooids. This intraparticle, intercrystalline porosity occurs in a fabric of equant, subhedral to euhedral, low-Mg calcite micro-rhombs which appear to have developed at the expense of an acicular precursor. Such microporous ooids are present mainly on the crests of paleobathymetric highs; nearby, offstructure ooids contain a mixture of micritic and well-preserved ooids. However, these micritic ooids are different from the micro-rhombic, microporous ones on the highs. The well-preserved low-Mg calcite ooids from offstructure positions exhibit relict acicular microstructures in some of their lamellae. The “chalky” microporosity is crosscut by virtually every other diagenetic feature in the Cotton Valley Limestone. The ϵ 13C values from individual microporous ooids range from +1.65 to +2.76% PDB, which is not in the range of values associated with precipitation in a hydrocarbon-rich environment. The formation of microporosity was followed by the formation of embayed grain contacts, pore-filling cementation, grain compaction, stylolite formation, replacements by quartz and rhombic dolomite, fracturing, fracture-filling cementation, saddle dolomite, late leaching, and formation of authigenic sulfides. The microporosity is interpreted to have been formed in the near surface diagenetic environment, early in the burial history of the Cotton Valley. As there is no evidence of vadose diagenesis, the ooids on the crests of calcarenite shoals must have been placed is disequilibrium with their surroundings by a change in water chemistry, probably as a consequence of regression and an influx of fresh water. The introduction of hydrocarbons appears to be contemporaneous with such late diagenetic features as saddle dolomite and authigenic sulfides; however, the extent to which those fluids affected the micro-rhombic calcite crystals appears to be negligible.