Cobalt-doped ZnO nanocrystals were studied through ab initio methods based on the Density Functional Theory. Both quantum confinement and surface effects were explicitly taken into account. When only quantum confinement effects are considered, Co atoms interact through a superexchange mechanism, stabilizing an antiferromagnetic ground state. Usually, this is the case for high quality nanoparticles with perfect surface saturation. When the surfaces were considered, a strong hybridization between the Co atoms and surfaces was observed, strongly changing their electronic and magnetic properties. Our results indicated that the surfaces might qualitatively change the properties of impurities in semiconductor nanocrystals.