Inversion tectonics are of paramount importance for forming a range of hydrocarbon traps and reservoirs for petroleum exploration. Also, the uplift and exhumation of strata, the activation and creation of faults and leakage or breaching of hydrocarbon traps are often attributed to multiple inversion. Changes in fluid activity and the geochemical system are frequently observed during such tectonic inversions. However, the impacts of tectonic inversion on fluid flow and potential diagenetic alterations within deeply buried sandstone reservoirs are not fully understood, posing challenges to accurately assessing reservoir quality and furthering exploration efforts. The Oligocene fluvial sandstones in the Yuquan anticline of the Xihu Depression were investigated by XRD, optical microscope and SEM-EDS-CL along with and petrophysical data to illustrate the impact of tectonic inversion on the evolution of diagenesis and reservoir quality. The two representative exploration wells, C-1 and C-2, originating from the same provenance and sedimentary background in Yuquan anticline, exhibit significant diagenetic alterations attributed to varying degrees of tectonic inversion. Notably, well C-1 has experienced more intense alterations and dissolution of detrital grains compared to well C-2 (average secondary pore, well C-1: 4.8%, well C-2: 2.9%), particularly the complete dissolution of plagioclase grains. Moreover, the content of authigenic kaolinite and quartz cement of well C-1 is higher than that of well C-2, averaging 7.2%, 4.5% and 5%, 1.7% respectively. This diagenetic difference is attributed to the fact that the activity of early NE-NNE oriented faults and the development of late nearly E-W oriented faults are stronger in the northern well C-1 field than in the central well C-2 field. The structural characteristics resulting from tectonic inversion led to enhanced efficiency in both organic acid supply from underlying source rocks in well C-1 field and export of dissolution products within the diagenetic system when compared with Well C-2 field. Regional tectonic inversion plays a predominant role in improving reservoir quality than sedimentary factors in the study area. While the well C-1 has a higher porosity than well C-1 (well C-1: average 18%, well C-2: average 13.1%), the permeability of well C-1 is worse than that of well C-2, with an average of 14.7 mD and 27.9 mD respectively. The alteration and dissolution associated with tectonic inversion significantly enhance the porosity of sandstone reservoirs. However, the formation of secondary pores and dissolution products can complicate the pore system of reservoirs, thereby reducing the reservoir permeability. Our research aims to provide a better understanding of fluid-rock interactions and genetic mechanisms in gas-bearing sandstone reservoirs under varying degrees of tectonic inversion. This will support pre-drill evaluations of reservoir quality in deeply buried formations as well as other analogous targets.