An in situ soil experimental system was designed to determine how urbanization impacts soil nitrogen and phosphorus dynamics. Variables including the road density, normalized difference vegetation index, distance to the nearest highway and industrial area from the soil experimental site, land use impact index, population density, population change index, total population, and percentage of water area were used to quantitatively explain the soil nitrogen and phosphorous contents. The results showed that the total phosphorous in the soil increased slowly after September 2013, indicating a phosphorous accumulation phenomenon in the soil in urban areas. The nitrate nitrogen in the soil had a higher value in September 2013, while the soil ammonium nitrogen content was higher during the winter. Moreover, the soil ammonium nitrogen content was higher than the nitrate nitrogen content during most of the experimental period. The distance from the urban centre, road density, proportion of built-up land, and population density can explain the soil nutrient dynamics quantitatively, showing that 45.4% of the soil nitrate nitrogen content, 84.1% of the soil ammonium nitrogen content, 44.6% of the ratio of NO3/NH4, 58.1% of the ratio of total inorganic nitrogen (TIN)/total phosphorous (TP), and 81.6% of the TIN could be explained by one of these variables at most. The potential factors affecting the changes in soil N contents include changes in human dietary habits as more people migrate to cities and industrial wastewater discharge. This study is helpful in quantitatively understanding the urbanization process and associated environmental impacts.