The spin-polarization and magnetic coupling of N-doped CdS nanowires (NWs) with a diameter size of 12.33 Ǻ have been investigated through first-principles calculations. The doped N prefers surface S sites and leads to a half-metallic property. The magnetic interaction between the nearest and the next-nearest N dopants results in a strong ferromagnetic (FM) coupling, while, when the distance between N dopants is larger than 8.0 Ǻ, the ground state of the system tends to be paramagnetic. Also, a nitrogen concentration threshold to produce the FM order is estimated to be 8.3 %. The results of incorporation of N dopants to CdS NWs pave a promising way to realize potential applications in spintronics.