The influence of oxygen doping on resistive-switching characteristics of Ag/a-Si/p+-c-Si device was investigated. By oxygen doping in the growth process of amorphous silicon, the device resistive-switching performances, such as the ON/OFF resistance ratios, yield and stability were improved, which may be ascribed to the significant reduction of defect density because of oxygen incorporation. The device I–V characteristics are strongly dependent on the oxygen doping concentration. As the oxygen doping concentration increases, the Si-rich device gradually transforms to an oxygen-rich device, and the device yield, switching characteristics, and stability may be improved for silver/oxygen-doped a-Si/p+-c-Si device. Finally, the device resistive-switching mechanism was analyzed.