We present the abundances of N in a sample of 62 stars on the red giant branch (RGB) in the peculiar globular cluster NGC 1851. The values of [N/Fe] ratio were obtained by comparing the flux measured in the observed spectra with that from synthetic spectra for up to about 15 features of CN. This is the first time that N abundances are obtained for such a large sample of RGB stars from medium-resolution spectroscopy in this cluster. With these abundances, we provide chemical tagging of the split RGB found from several studies in NGC 1851. The secondary reddest sequence on the RGB is populated almost exclusively by N-rich stars, confirming our previous suggestion based on Strömgren magnitudes and colours. These giants are also, on average, enriched in s-process elements such as Ba, and are likely the results of pollution from low-mass stars that experienced episodes of third dredge-up in the asymptotic giant branch phase.