Biological ion pumps with two separate gates can actively transport ions against the concentration gradient. Developing an artificial nanofluidic device with multiple responsive sites is of great importance to improve its controllability over ion transport to further explore its logic function and mimic the biological process. Here, we propose an electrochemical polymerization method to fabricate electrochemically switchable double-gate nanofluidic devices. The ion transport of the double-gate nanofluidic device can be in situ and reversibly switched among four different states. The logic function of this nanofluidic device is systematically investigated by assuming the gate state as the input and the transmembrane ionic conductance as the output. A biomimetic electrochemical ion pump is then established by alternately applying two different specific logic combinations, realizing an active ion transport under a concentration gradient. This work would inspire further studies to construct complex logical networks and explore bioinspired ion pump systems.