Natural gas hydrates and shallow gas are widespread in the southern Qiongdongnan Basin, yet the mechanism by which deep-sourced gas penetrates thick horizontal strata to accumulate in shallow sand-rich sediments remains unclear. Using 2D/3D seismic and drilling core data, this study demonstrates that buried carbonaterich troughs in the Miocene Meishan Formation contribute to shallow gas and gas hydrate accumulations. The troughs developed between horizon T50 (15.5 Ma) and horizon T40 (11.6 Ma), exhibit elongated alternating distributions and inverted triangular seismic reflections, and are filled with carbonate-rich mudstones derived from reef erosion in the Beijiao Uplift. Their formation was controlled by large-scale faults originating from basement uplifts (which created negative topography) and carbonate turbidity currents (which caused erosion and infilling). Influenced by sealevel fluctuations and reef development in the Beijiao Uplift, the troughs migrated southward in three stages, with the peak at T41 (13.8 Ma). Differential compaction faults, polygonal faults, and gas chimneys formed a fluid migration system. Driven by late-stage tectonic activities and overpressured gas, this system transported deepthermogenic gas to the shallow Ledong Formation, promoting the accumulation of shallow gas and gas hydrates in turbidite sandstones. This study clarifies the genesis of the troughs and their function as a link between deep gas sources and shallow reservoirs, aiding resource exploration.