Oxygen and nitrogen actually react to form nitric oxide.

> $$\ce{O2 + N2 ⇄ 2NO}$$
> 
> Oxygen react with nitrogen to produce nitrogen(II) oxide. This
> reaction takes place at the high temperature[about 2000°C(without catalyst) ;
> 1200-1300°C(with catalyst)), an overpressure and in the presence of a 
  catalyst.
> In this reaction, the catalyst is can be platinum, manganese(IV)
> oxide.([Chemiday][1])

In [wikipedia article of nitric oxide][2], it is written that:

> **The uncatalyzed endothermic reaction of oxygen (O2) and nitrogen (N2), which is performed at high temperature (>2000 °C)** by lightning
> has not been developed into a practical commercial synthesis (see
> Birkeland–Eyde process):
> 
> $$\ce{N2 + O2 → 2 ·NO}$$
> 
> From a thermodynamic perspective, ·NO is unstable with respect to O2
> and N2, although this conversion is very slow at ambient temperatures
> in the absence of a catalyst. Because the heat of formation of ·NO is
> endothermic, **its synthesis from molecular nitrogen and oxygen
> requires elevated temperatures above 1000 °C.**




  [1]: http://chemiday.com/en/reaction/3-1-0-694
  [2]: https://en.wikipedia.org/wiki/Nitric_oxide