The invention discloses a method for recovering valuable metals from a waste printed circuit board. The method comprises the following steps: sorting and crushing the printed circuit board, evenly mixing powder containing multiple metal parts with a fluxing agent, and smelting at low temperature for 1-3.5h; adding hot water into smelting products for leaching; evaporating and concentrating filtrate after filtration, and then returning evaporation mother liquor to the water leaching process step; using solution after leaching for swirl electrodeposition of metal silver, and adding 5-25% of HNO3 into filter residue for leaching; filtering the solution after electrodeposition, and adding 1-5 times of the weight of aqua regia into the filter residue for leaching; using the solution after leaching by the aqua regia for the swirl electrodeposition of gold, adding saturated NH4Cl into the solution after the electrodeposition for reaction, then filtering, using ammonium chloroplatinate for refining the filter residue, obtaining sponge platinum, adding methanoic acid into the solution after precipitation, and carrying out reaction for obtaining crude palladium powder. The method can extract copper, nickel, silver, gold, platinum, palladium and other main products and other by-products, realize the maximization of reutilization of value metal resources in the waste printed circuit board and solve the environmental pollution problem; and the adoption of the swirl electrolysis technology can realize low energy consumption, low reagent consumption, short process flow and simple operation.