Conducting research on the spatial cognition of tourists in historical towns helps to balance cultural heritage protection and tourism development. However, the current tourist cognition research is not comprehensive enough in terms of data sources, time dimension, and spatial objects. This research takes Fengjing Ancient Town in Shanghai as an example, and through multi-source data analysis explores how tourists’ perception and cognition of the attractions changes, discusses the impacts of characteristic of spatial system and elements on perception, and then establishes a spatial cognition analysis framework involving time dimension, cognitive depth, and spatial type. On-site aerial photos, Sina Weibo check-in data, tourist memory maps, and photos from tourism websites were used to classify tourists’ spatial cognition through content analysis, theme classification, and GIS spatial analysis. This research finds that tourists have formed three cognitive levels in the travel process, from “initial spatial consciousness” to “place memory” then to “imagery perception”. Meanwhile, space is the most important object of tourists’ cognition, and it is also the carrier of other intangible cultures. In terms of spatial cognition and ancient town tourism, this research finds the tourists’ spatial cognition of Fengjing Ancient Town is related to the main river and main tourist routes that represent the image characteristics of the ancient town. This research shows that clear boundaries of tourism space, richer folk activities, and more sequential tourism routes could help tourists form a more systematic spatial cognition. Based on the findings, this research also establishes an analysis and application framework of tourists’ multilevel spatial cognition to provide optimization suggestions for development of tourism.