In many megacities wastewater is an important source of surface water, particularly during drought periods. While changes in surface water chemistry associated with effluent inflow have generally been well-studied, few data have been collected on the effects to prokaryotic communities. The objective of this study was to explore the impacts of treated and untreated wastewater discharges on prokaryotic community in an urban river. High-throughput sequencing was conducted for analyzing the prokaryotic community composition and function in river water, treated wastewater and untreated wastewater. Results revealed that the prokaryotic community compositions in the upstream river reach were dominated by treated wastewater discharge. In the middle-and downstream river reaches, untreated effluent volumes are higher, thus affecting the structure of the prokaryotic community, promoting a rise in Cyanobacteria and Thaumarchaeota. Function annotation revealed a number of genes associated with xenobiotic metabolism and human diseases were observed in river and wastewater samples, suggesting wastewater discharge to river may pose a risk to human health. Quantitative realtime PCR results revealed that the treated and untreated wastewater discharges also affected the abundance of ammonia oxidation bacteria (AOB) and ammonia oxidation archaea (AOA) in river.