Drawing on the function of biological synapses, the development of electronic synaptic devices aims to achieve a neuromorphic computing system with high performance and low energy consumption. In this work, the Ruddlesen–Popper phase Ba2TiO4/TiO2 heterojunction memristor was prepared by the sol–gel method. Hysteresis loops and piezoelectric force microscopy demonstrate excellent ferroelectric properties of Ba2TiO4, which allows the Ba2TiO4-based memristor to exhibit a multiresistive state under applied voltage. Synaptic characteristics such as short/long-term plasticity and paired-pulse facilitation/depression are achieved through electrical pulses. In addition, the memristor achieves nonvolatile modulation under the stimulation of optical pulses, mainly attributed to the Ba2TiO4/TiO2 heterojunction promoting the separation of photogenerated carriers. The "learning experience" process is successfully achieved, and the minimum energy consumption of a single synaptic event is only 0.051 pJ. A reservoir neural network is constructed to evaluate the reliability of Ba2TiO4/TiO2 heterojunction memristors. The recognition accuracy of the clothing data sets reaches 91.2%. Our research provides an idea for explaining the nonvolatile modulation and reservoir computing of photoelectric memristors.