Underground natural gas storage (UNGS), usually regarded as one of the most important gas storing and peak shaving method today, has been widely used in various parts of the world. The pipeline gathering system plays a key role in UNGS surface engineering. Thus, optimization of the whole system is crucial to lower the total investment. However, we cannot find that any scholars have published related papers on the gathering pipeline network for UNGS at present. This paper focuses on the two-level star gas field gathering pipeline network construction, establishes a mixed integer nonlinear programming (MINLP) model with considering the injection and withdrawal process of UNGS. Minimizing pipeline network investment is the object of this model. Constraints of connection mode, platform, pipe length, flow rate, node pressure, pipe diameter are also taken into consideration in this model. A special genetic algorithm is proposed to figure out the optimal topological structure, location of platform and central station, pipe diameter, gas velocity along each pipe of this model. Last, two typical real cases are taken to test the applicability of the proposed model and the accuracy of the special GA. The optimal results indicate the mathematical model can lower the total investment and the corresponding GA can solve it efficiently.