The possibility of tuning the magnetic behaviour of nanostructured 3d transition metal oxides has opened up the path for extensive research activity in the nanoscale world. In this work we report on how the antiferromagnetism of a bulk material can be broken when reducing its size under a given threshold. We combined X-ray diffraction, high-resolution transmission electron microscopy, extended X-ray absorption fine structure and magnetic measurements in order to describe the influence of the microstructure and morphology on the magnetic behaviour of NiO nanoparticles (NPs) with sizes ranging from 2.5 to 9 nm. The present findings reveal that size effects induce surface spin frustration which competes with the expected antiferromagnetic (AFM) order, typical of bulk NiO, giving rise to a threshold size for the AFM phase to nucleate. Ni(2+) magnetic moments in 2.5 nm NPs seem to be in a spin glass (SG) state, whereas larger NPs are formed by an uncompensated AFM core with a net magnetic moment surrounded by a SG shell. The coupling at the core-shell interface leads to an exchange bias effect manifested at low temperature as horizontal shifts of the hysteresis loop (~1 kOe) and a coercivity enhancement (~0.2 kOe).