Streetscape quality is crucial for fostering residents’ place attachment. The research explores the influence of perceived streetscape quality on residents’ place attachment. Streetscape quality contains four dimensions: safety, comfort, walkability, and imageability. Place attachment includes place identity and place dependence. A total of 428 valid questionnaires were collected from residents in Zhengding Ancient City, China. The data were analysed using structural equation modelling (SEM). The results indicate that different dimensions of streetscape quality have differential effects on place identity and place dependence. Comfort and imageability positively impact place identity. Safety, comfort and walkability positively influence place dependence. These results provide valuable guidance for local governments to enhance streetscape quality.