Electrically induced resistive switching resulting from ionic transport and electrochemical redox reactions is promising for future generation non-volatile memory devices and artificial neural computing. The key ingredient for the highly efficient neural computing in this context is a memristor, which is a special type of a resistive two-terminal element whose electrical properties depend on not only the state of the element but also how the state has been achieved in its history. Memristor characteristics are demonstrated in a bilayer junction of Al and a Bi–Cu–S alloy utilizing electrically reversible generation of an insulating interface. The high resistance due to the interface layer drops abruptly by orders of magnitude when the barrier is annihilated electrochemically under a bias. The barrier is made to be robust by applying a reverse bias, giving rise to a controllable memory effect on the switching phenomenon. The switching mechanism based on the manipulation of a barrier, which is complementary to conventional bridging conductive filaments, will open the way for new functionalities as device elements.