InP nanowires are candidates for optoelectronic applications, and as protective capping layers of III-V core-shell nanowires. Their surfaces are oxidized under ambient conditions which affects the nanowire physical properties. The majority of theoretical studies of InP nanowires, however, do not take into account the oxide layer at their surfaces. In this work we use first principles molecular dynamics electronic structure calculations to study the first steps in the oxidation process of a non-saturated InP nanowire surface as well as the properties of an already oxidized surface of an InP nanowire. Our calculations show that the O molecules dissociate through several mechanisms, resulting in incorporation of O atoms into the surface layers. The results confirm the experimental observation that the oxidized layers become amorphous but the non-oxidized core layers remain crystalline. Oxygen related bonds at the oxidized layers introduce defective levels at the band gap region, with greater contributions from defects involving In-O and P-O bonds.