In recent years, sodium-ion batteries (SIBs) have attracted a lot of attention and are considered an ideal alternative to lithium-ion batteries (LIBs). The hard carbon (HC) anode in SIBs presents a unique challenge for studying the formation process of the solid electrolyte interphase (SEI) during initial cycling, owing to its distinctive porous structure. This study employs a combination of ultrasonic scanning techniques and differential electrochemical mass spectrometry to conduct an in-depth analysis of the two-dimensional distribution and composition of gases during the formation process. The findings reveal distinct gas evolution behaviors in SIBs compared to LIBs during formation. Notably, significant gas evolution is observed during the discharge phase of the formation cycle in SIBs, with higher discharge rates leading to increased gas evolution rates. This phenomenon is likely attributed to the adsorption of CO2 gas by the abundant pores in HC, followed by desorption during discharge. Furthermore, the study demonstrates that the addition of 5A molecular sieves, which competitively adsorb gases, effectively reduces gas adsorption on the anode during formation, thereby significantly enhancing battery performance. This research elucidates the gas adsorption and desorption behavior at the battery interface, providing new insights into the SEI formation process in SIBs.