The mudstone compaction research, in combination with hydrocarbon distribution, reveals that the Mesozoic overpressure in the western Mahuangshan is horizontally distributed in the eastern stable belt and the central depression belt, vertically mainly in the Chang 7 and Yan 7 members in the western Mahuangshan. Oil source faults and deeply undercut river valleys act as migration pathways for the discharge and accumulation of oil and gas in the Yan’an Formation. The Yan’an Formation regional overpressure belt strengthens the sealing ability of the regional cap rock, preventing upward migration or dissipation of oil and gas, and oil and gas can only accumulate below the overpressure area.