Underwater compressed gas energy storage (UW-CGES) holds significant promise as a nascent and viable energy storage solution for a diverse range of coastal and offshore facilities. However, liquid accumulation in underwater gas pipelines poses a significant challenge, as it can lead to pipeline blockages and energy transmission interruptions and adversely impact pipeline operation. In this paper, experimental and Oil and Gas Assays (OLGA) simulation studies have been conducted on the formation process of slug flow in pipelines. Firstly, experiments are conducted to capture high-speed camera images of slug flow under various liquid accumulation volumes and inclination angles. Subsequently, an OLGA model is developed to verify the experimentally observed flow regime, pressure, and slugging speed. Therefore, the flow regime verification results exhibit substantial consistency, and pressure variations display uniform trends, with an average slugging velocity error of 6.42%. The results indicate that the formation of slug flow involves three distinct stages: slug flow growth, ejection, and backflow. By analyzing slug flow, it can gain insights into the relationship between pressure and slug flow formation, exposing the sensitivity of this phenomenon to pressure fluctuations. These results further enhance recognition of the operational status of UW-CGES pipelines and provide support for safe operation.