The invention discloses a method for recovering copper, cobalt and nickel from copper and nickel slag. The method comprises the following steps: leaching a soluble substance through ore grinding and powder concentration by using an acid, performing solid-liquid separation to obtain a leaching solution I and leaching slag I; oxidizing soluble metals in the leaching slag I, regulating the pH value, precipitating and separating the iron, and performing solid-liquid separation to obtain a separation solution II and separation slag II; continuously adding the copper and nickel slag into the separation solution II, regulating the pH value so as to ensure that soluble silicon is precipitated in a silicate form, and performing solid-liquid separation to obtain a separation solution III and separation slag III; finally, precipitating the copper, cobalt and nickel in the separation solution III by using sodium dimethyl dithiocarbamate and xanthate, and performing solid-liquid separation to obtain separation slag IV, namely the recovery product. According to the reasonable process design, common chemicals and methods are used, the copper, cobalt and nickel are recovered from the copper and nickel slag, the environment can be prevented from being polluted by waste residues, and rare metals such as copper, cobalt and nickel can be effectively recovered. Moreover, the product process parameters are easily controlled, and novel environmental pollution is avoided.