Plastic-shed vegetable cultivation is characterized by high nitrogen (N) application rates, frequent irrigation and multiple cropping, probably leading to different soil N transformation rates compared to open-field cultivation. However, how continuous cultivation of vegetables under plastic sheds affects soil N transformation rates and associated nitrous oxide (N2O) emissions remains unclear. Here, a 15N-tracing experiment in combination with the qPCR technique was used to investigate the effects of conversion from conventional open-field cultivation to plastic-shed vegetable cultivation, as well as the age of this shift, on soil gross N transformation rates, N2O emission pathways and associated microbial abundances. Five typical fields, including a wheat–maize rotation system field and four adjacent plastic-shed vegetable fields under cultivation for 2, 5, 12 and 20 years, were selected. Soil gross N mineralization rates increased significantly after two years after conversion from a wheat–maize rotation system to a plastic-shed vegetable system, and then decreased with an increase in plantation age, which could be attributed to decreased soil total phosphorus availability. Long-term vegetable plantation under plastic-shed decreased soil gross autotrophic nitrification rates significantly by decreasing ammonia-oxidizing bacteria abundance probably due to decreasing soil pH. Such decreased rates of autotrophic nitrification further led to decreased N2O emissions under plastic-shed cultivation. Under long-term plastic-shed cultivation (>2 years), negligible gross nitrate-N (NO3−-N) immobilization rates were observed due to the preferential use of ammonium-N by soil microbes, which was probably responsible for rapid NO3−-N accumulation in soils. Overall, these results could be of help to elucidate the mechanisms of soil N2O emission and NO3−-N accumulation in plastic-shed vegetable fields.