Materials with in situ reversible wettability have attractive properties but remain a challenge to use since the inverse process of liquid spreading is normally energetically unfavorable. Here, we propose a general electrochemical strategy that enables the in situ reversible superwetting transition between underwater superoleophilicity and superoleophobicity by constructing a binary textured surface. Taking the copper/tin system as an example, the surface energy of the copper electrode can be lowered significantly by electrodeposited tin, and be brought back to the initial high-energy state as a result of dissolving tin by removing the potential. Tin atoms with the water depletion layer inhibit the formation of a hydrogen-bonding network, causing oil droplets to spread over the surface, while copper atoms, with a high affinity for hydroxyl groups, facilitate replacing the oil layer with the aqueous electrolyte. The concept is applicable to other systems, such as copper/lead, copper/antimony, gold/tin, gold/lead and gold/antimony, for both polar and nonpolar oils, representing a potentially useful class of switchable surfaces.