Two-dimensional electron gas (2DEG) at the complex oxide interfaces have brought about considerable interest for the application of the next-generation multifunctional oxide electronics due to the exotic properties that do not exist in the bulk. In this study, we report the integration of 2DEG into the nonvolatile resistance switching cell as a bottom electrode, where the metal-insulator transition of 2DEG by an external field serves to significantly reduce the OFF-state leakage current while enhancing the on/off ratio. Using the Pt/Ta2O5-y/Ta2O5-x/SrTiO3 heterostructure as a model system, we demonstrate the nonvolatile resistance switching memory cell with a large on/off ratio (>10(6)) and a low leakage current at the OFF state (∼10(-13) A). Beyond exploring nonvolatile memory, our work also provides an excellent framework for exploring the fundamental understanding of novel physics in which electronic and ionic processes are coupled in the complex heterostructures.