Urban cemeteries are an important part of a city's public service infrastructure. In China, because of the influence of traditional culture, cemeteries have significant negative externalities in terms of residents' emotions and are representative facilities with clear not-in-my-backyard characteristics. Thus, their planning and construction are often rejected by residents. This study ranks the relevant influencing factors, such as residence location and distance to an urban cemetery. Further, a typical log linear hedonic model is developed based on the ordinary least-squares method, and correlations among the variables are analyzed. We find that, first, cemeteries have a significant effect on residential prices within a 1 km radius. Second, the blockage of the line of sight by the topography and greenery of the cemetery significantly weakens its effect on the prices of surrounding residential housing. In addition, the traffic location advantages of residences around the cemetery and the spatial division of major urban roads reduce the negative effect of the cemetery on surrounding residential prices. Planners need to consider more spatial elements when planning urban cemeteries. Especially in the case of tight land use, this has a positive impact on alleviating the contradictions in urban development.