The electronic structures and magnetic properties of Pd-doped CdS have been studied by a first principles study. We find that the material becomes 100%spin-polarized when Pd substitutes for Cd atom in a 3脳3脳2 CdS supercell, and forms a diluted magnetic semiconductor (DMS). A long-range ferromagnetic (FM) coupling is obtained between two Pd dopants. We concluded that the hybridized Pd(4d)-S(3p)-Cd(4d)-S(3p)-Pd(4d) chain through p-d coupling is responsible for the long-range FM coupling.