We first investigate the effect of oxygen-doping concentration on resistive switching (RS) behaviors in SiCxOy, which were prepared by a radio frequency magnetron sputtering at the oxygen partial pressure ranging from 0% to 6%. Bipolar RS behaviors were achieved in all the fabricated devices and all these devices are valence change memories. With the oxygen partial pressure increasing from 0% to 6% (sample-0% has 40 at. % of oxygen), the mean RHRS increases from 4.5 to 64.8 MΩ and then decreases to 1.5 MΩ, indicating that the device exhibits the largest ON/OFF ratio ∼500 at the oxygen partial pressure of about 2%. Based on the analyses of x-ray photoelectron spectroscopy, fitting current–voltage curves, and resistance–temperature measurements, it is clear that the trap filled limit space charge limited current and a Schottky barrier in the interface of the SiCxOy film and p+-Si are suggested to be dominant in the positive and negative biases, respectively. Most importantly, all devices can keep the data more than 104 s and endure more than 102 continuous cycles, thus confirming the nonvolatile properties.