In the context of population aging, the study of the impact of the pension insurance system on the savings behavior of urban residents can help reduce preventive savings, increase current consumption, and promote the healthy development of the economy. This study constructs a two-period OLG model of the pension insurance system based on the preventive saving perspective using urban panel data of 31 provinces from 2002 to 2021 and conducts empirical analysis through the systematic generalized method of moments. The results show that the pension insurance participation rate was positively correlated with the savings rate, while the pension replacement rate was negatively correlated with the savings rate, and this effect varied significantly across income levels and different levels of aging. Increased participation in high-income areas promoted savings, while increased pension replacement rates in low-income areas reduced savings. The positive correlation between participation rates and savings rates was more pronounced in regions with higher levels of aging, while the opposite was true in regions with lower levels of aging. In addition, the negative correlation between pension replacement ratios and savings rates was particularly pronounced in high-aging regions.