Urban soil is an important part of the urban ecosystem, which is strongly correlated with human health and life quality. In this study, Lin'an city was chosen as a typical small city to study the spatial variation and distribution of heavy metals in urban soils and their pollution characteristics using multivariate analysis, geostatistics, and GIS techniques. A total of 62 soil samples were collected from the study areas. The results indicated that the average concentrations of soil Mn, Cu, Zn, Pb, Cr, and Cd were 439.42, 42.23, 196.80, 62.55, 63.65, and 0.22 mg·kg-1, respectively. Compared with the background values and the environmental quality standards, these heavy metals were accumulated in urban soils to some extent. Almost 80% of the study area was polluted by heavy metals. The single potential ecological risk index of heavy metals indicated that Pb had the highest ecological risk. The pH and most of the heavy metals had strong correlations, and there were strong correlations among the heavy metals. The principle component analysis (PCA) showed that Pb, Zn, and Cu had the same pollution source, which was related to vehicle exhausts; Mn and Cr were mainly from the parent material; and Cd was from the emissions of manufacturing plants. The spatial structure and distribution of heavy metals and their corresponding available fractions had strong spatial autocorrelation with all of the C0/(C0+C)<50%. Their spatial patterns were influenced by human activities.