We have synthesized ZnO nanoparticles capped with butanethiol, octanethiol, and dodecanethiol. In all of the cases, the capped ZnO nanoparticles exhibit ferromagnetic-like behavior up to room temperature whose intrinsic origin has been demonstrated by using both X-ray magnetic circular dichroism (XMCD) and X-ray absorption spectroscopy (XAS) at the Zn K-edge. Using these tools, we have also determined that the occurrence of ferromagnetism does not critically depend on the details of the synthesis but on the formation of a pristine ZnS/ZnO interface. Within this interface, ferromagnetism is favored in those regions where the local order is closer to wurzite-like ZnO than to w-ZnS. The study of ZnS-ZnO films prepared by cosputtering clearly indicates that increasing the disorder of this interface weakens the onset of ferromagnetic behavior.