Gold and palladium are the most widely used precious metal materials in the field of electronic devices and industrial catalysis. How to realize the green recycling of gold and palladium is important and challenging. In this work, we found that gold and palladium in wastes, such as electronic devices and industrial catalysts, can be completely dissolved and recycled by photocatalysis. Gold and palladium are oxidized to the ionic state in water, which does not involve strong acids, strong alkalis, toxic cyanides, or an organic medium. More interestingly, the dissolution of gold and palladium in different halogen aqueous solutions has special selectivity, which depends on the coordination stability constants between gold and palladium with halide ions. Therefore, gold and palladium can be selectively dissolved in iodine ion solution and bromine ion solution, respectively, then gold and palladium can be obtained by a one-step reduction. This work opens up a new direction for optimizing the photocatalytic dissolution technology and promoting the green recycling of precious metals.