Geochemical fingerprinting of formation waters and hydrocarbons can be utilized to track the migration, accumulation, and preservation of hydrocarbons. The present case study from the Shulu Sag, Bohai Bay Basin, NE-China analyzes the origin of the formation waters and the relationship between water chemistry and hydrocarbon preservation by combining the geochemical characteristics of formation waters and crude oils. There are three geochemical groups of formation waters with different origins, which represent different hydrodynamic environments and hydrocarbon preservation conditions. Group 1 waters are related to meteoric water with the lowest total dissolved solids (TDS), γ(Cl–Na)/γMg and the highest γNa/γCl, representing an open environment with poor hydrocarbon preservation conditions, accompanied by super heavy oils. Group 3 waters are connate water with the highest TDS, γ(Cl–Na)/γMg and the lowest γNa/γCl, representing a closed environment with the best hydrocarbon preservation conditions, accompanied by light oils. Group 2 waters are intermediate between Group 1 and Group 3 waters, representing a semi-open environment with intermediate hydrocarbon preservation conditions, accompanied by light, medium, and heavy oils. The clear corresponding relationship between oil quality and associated water type shows that water chemistry significantly affects the oil quality and accumulation in the Shulu Sag through secondary changes. Biodegradation is the dominant effect in the strata above 2100 m. Water washing is dominant in the depth range of 2100–3400 m, and there are no noticeable secondary changes in the strata below 3400 m. A model for the origin, evolution, and flow of formation waters in the Shulu Sag is established to analyze the hydrocarbon accumulation process. Meteoric waters flow into the buried hills from Ningjin Uplift as a result of gravity flow, resulting in modification of oil composition, destruction of the oil reservoirs, and the formation of Group 1 waters. During the hydrocarbon charging, the centrifugal flow driven by overpressure flows in two directions from the source rocks, one is to the western slope and mixes with meteoric waters to form Group 2 waters and heavy oil reservoirs, and the other is to the paleo-uplift to form Group 2 and Group 3 waters and light oil reservoirs. Water chemistry is sensitive to the hydrodynamic environment change and can be an important reference for oil and gas exploration. Buried hills with Group 3 waters should be the highest priority for further exploration, whose oil reservoirs are dominated by light oil with high commercial value. Although the oil quality is poor, buried hills with Group 2 waters in the slope can be secondary targets. In comparison, the buried hills with Group 1 waters should be avoided for oil and gas exploration. The geochemistry of formation waters helps understand the origin and evolution of formation waters, predict oil quality and distribution, and further aids oil and gas exploration.