The behavior of gases within subsurface pores determines the oil and gas recovery and CO2 storage in the region. In this study, we report a novel method based on Raman spectroscopy for observing the distributions of CH4 and CO2 gases in the pores of sandstone reservoirs. First, we designed a pressure-cell to inject gases into a sample. Then, CH4 and CO2 gases were injected into the sample using the pressure-cell placed on the Raman spectroscopy system sample stage. Quartz and feldspar were the predominant minerals in the sample. The CH4-occupied pores exhibited a Raman peak at 2917 cm−1. Two-dimensional (2D) and three-dimensional (3D) mapping of the pores depicted the geometry of the CH4 gas-filled pores. After injecting CO2 gas, we observed an intensity peak at 1388 cm-1; we obtained 2D and 3D maps of the CO2 gas-filled pores based on this peak value. This study demonstrates the potential use of Raman spectroscopy as a visualization tool to reveal the pore geometry of sandstone reservoirs and determine the distribution of gases within such reservoirs. Our study can serve as a foundation for understanding the behavior of gases in subsurface reservoirs, improving oil and gas prospecting and exploration, and assessing CO2 storage..