In the present work, superhydrophobic silver surface was prepared by immersing a copper plate in an aqueous solution of AgNO3 for 20min. The sample exhibits superhydrophilicity after dried at 150°C for 30min in an oven. The as-prepared silver surfaces exhibit contact angle (CA) larger than 160° and sliding angle (SA) lower than 5°. Neither low surface free energy (SFE) materials nor organic compounds were used during the producing process. It was suggested that the spontaneously adsorbed carbon contaminant with low SFE was very critical for the superhydrophobicity of silver surface during heat treatment. Additionally, the silver surface could be switched between superhydrophobicity and superhydrophilicity by alternating UV irradiation and heat treatment for many times. Our findings in this work might provide a simple route to rational control the spontaneously adsorbed carbon contaminant on solid surface to endow the metal or other solid surfaces with superhydrophobicity or superhydrophilicity.