The Yingshan Formation of the Lower-Middle Ordovician in the Tarim Basin (NW China) was mainly deposited in a shallow platform, which was intensely bioturbated with burrows filled with both dolomites and calcites. This study aims to figure out the controls on the dolomitization of burrow infills and the effects on petroleum reservoir quality based on petrographic examination, fluid inclusion microthermometry, and isotopic (C-O-Sr) geochemical analyses. The differentiation of burrow-associated carbonates (dolomites and calcites) was likely controlled by the interactions of sea-level oscillations of variable orders and depositional environments. The burrow-associated dolomites (BADs) were precipitated in a relatively restricted (i.e., lagoon) depositional environment during the lowstand of long-term sea level. In contrast, the burrow-associated calcites (BACs) were formed in a water circulation-improved lagoonal environment during the transgression of long-term sea level. Isotopic geochemical data indicate that the BADs in the Yingshan Formation were formed from slightly saline (i.e., mesosaline to penesaline) seawater, whereas the BACs were precipitated from nearly normal seawater. In addition to the anoxic condition, the presence of marine-sourced organic matter and sulfate-reducing bacteria, and a sufficient supply of dolomitizing fluids enriched in magnesium ions (Mg2+) and their Mg2+ concentration may have played a critical role in the formation of BADs. In the more permeable and disturbed burrow sediments as a result of burrowing, penetrating fluids with higher salinities and higher Mg2+ concentration relative to seawater favored dolomite precipitation. The fluids with seawater-like Mg2+ concentration, however, would lead to calcite precipitation. The progressive dolomitization of these burrowed sediments could have propagated the dolomitizing fronts and extended into ambient limestones, leading to the development of extensive dolomites. This dolomitization process can improve the petrophysical properties (porosity and permeability) and the potential as hydrocarbon reservoirs during the emplacement of hydrocarbons from underlying source rocks of the Cambrian to Lower Ordovician.