Atmospheric ammonia plays an important role in haze formation in East China. In this study, long-term measurements of NH3 concentrations were implemented at urban, suburban, and tunnel sites in Shanghai, the largest city in East China. The average monthly ammonia concentrations at the urban site varied from 3.7 ppb to 14.5 ppb and exhibited the highest levels in summer and lowest levels in winter, indicating that the biological emissions and agriculture in the surrounding areas are important contributors. The suburban NH3 levels were significantly higher in autumn compared to those at the urban site, indicating the important contribution of agricultural activities. Regardless of the season, the difference of NH3 concentrations between the tunnel and urban sites remained almost constant. On average, the tunnel NH3 level was three times higher than that of the nearby urban site, indicating strong vehicle NH3 emissions in the tunnel. The tunnel NH3 levels on weekdays were comparable to those on weekends, a result that was in agreement with the daily average traffic volume. It was estimated that the vehicle emissions contributed 12.6-24.6% of the atmospheric NH3 in the urban area and 3.8-7.5% for the whole area of Shanghai. Our results suggest that vehicle NH3 emissions should be considered, although agricultural emissions are still more important for mitigating severe haze pollution during wintertime in the megacities of China.