Aims. During a full line survey towards IRC +10420 in the 3 and 1 mm bands, we detected the emission of circumstellar nitric oxide for the first time. We aim to study the formation of NO and to confirm the enrichment of nitrogen expected for the most massive, evolved stars predicted by the hot bottom burning process. Methods. We counted on a detailed model of the structure and kinematics of the molecular gas around IRC+10420. In addition, we used a chemical model to derive the NO abundance profile. We modified the initial nitrogen abundance in order to fit the observed NO profiles. These synthetic profiles were obtained using an LVG radiative transfer code. Results. We have detected NO in a circumstellar envelope for the first time, along with a variety of N-rich molecules, which in turn shows that IRC +10420 presents a N-rich chemistry. Furthermore, we have found that to reproduce the observed NO line profiles, the initial abundance of nitrogen in the chemical model has to be increased by a factor 20 with respect to the values of the standard O-rich stars.