For the embedded application of the resistive switching memory using CuxO films, the controllable switching polarity and optimized low resistance state was investigated. Stable bipolar switching behavior was demonstrated for the TaN/CuxO/Cu device. TaON was observed at the anode interface by x-ray photoelectron spectroscopy and transmission electron microscopy, which is believed to play a key role in the resistance transition. The physics behind this phenomenon of reactive top-electrode is revealed. A filament/charges trapped combined model is proposed to clarify the electrical characteristics of the top-electrode/oxide reactions. This observation presents a unique opportunity to elucidate a universal mechanism for the resistive switching of transitional metal oxides.