Ammonium (NH4+) pollution and associated processes causing environmental problems in aquatic ecosystems have attracted much attention. However, the microbial pathways of NH4+ production and removal and associated influencing factors in the sediments of urban rivers remain unclear. In this study, microbial pathways of NH4+ production and removal were quantified to examine the NH4+ balance in the sediments of Shanghai river networks. The results indicated that potential rates of gross nitrogen mineralization, dissimilatory nitrate reduction to ammonium, and nitrogen fixation ranged from 0.25 to 25.83 μg N g−1 d−1, from undetectable to 3.47 μg N g−1 d−1, and from 0.07 to 3.05 μg N g−1 d−1, respectively. The potential rates of gross NH4+ immobilization, anammox, and nitrification, as the NH4+ removal processes, ranged from 0.24 to 26.27 μg N g−1 d−1, from 0.01 to 7.97 μg N g−1 d−1, and from 0 to 9.62 μg N g−1 d−1, respectively. Temperature, dissolved oxygen, NO3−, NH4+, and total organic carbon had great influences on these NH4+ production and removal processes. In addition, the total amounts of NH4+ production and removal through microbial pathways in sediments of Shanghai river networks were estimated at approximately 2.6 × 105 t N yr−1 and 3.9 × 105 t N yr−1, respectively. Thus, the net sink of NH4+ was 1.3 × 105 t N yr−1, which accounts for 22% of total inputs of nitrogen in the river networks. These results indicate that microbial processes of removal in sediments can eliminate significant parts of NH4+ generated from microbial pathways and/or inputs from anthropogenic activities in urban rivers. Overall, these results improve understanding of NH4+ production and removal and associated influencing environmental factors and highlight the environmental importance of these processes in regulating the NH4+ budget in highly urbanized riverine ecosystems.