In a discharging battery or galvanic cell (diagram at right), the anode is the negative terminal because it is where conventional current flows into "the device" (i.e. the battery cell).
In a recharging battery, or an electrolytic cell, the anode is the positive terminal, which receives current from an external generator.