Urban vulnerability is evident when highly complex flood risks overlap with diverse cities, and it is important to enhance the resilience of cities to flood shocks. In this study, a sponge city resilience assessment system is established considering engineering, environmental and social indicators, and the grey relational analysis method(GRA) is used to quantify sponge city resilience. At the same time, a multi-objective optimization model is established based on the three dimensions of water ecological environment, drainage safety, and waterlogging safety. The optimal configuration of grey-green infrastructure is weighed by combining the ideal point method, aiming to ensure that cities effectively reduce flood risk through the optimal configuration scheme. Taking the Xiaozhai area in Xi'an as the study area, the evaluation results show that the grey relational degree(GRD)of the resilience indexes of the original scheme is between 0.390–0.661 under the seven different return periods. While the optimization scheme ranges from 0.648–0.765, with the best sponge city resilience at a return period of 2a. Compared with the original scheme, the optimized sponge city resilience level increases from level II to nearly level I under the low return period and from level IV to level II in the high return period, indicating that city's ability to cope with waterlogging and pollution is enhanced significantly. Besides, the main factor affecting the sponge city resilience is the runoff control rate, followed by pollutant load reduction rate, which can provide a methodological framework for the assessment and improvement of sponge city resilience.