Ferroelectric optoelectronic memories, capable of integrating sensing, computing, and storage functionalities, hold significant potential in the fields of artificial intelligence and the Internet of Things. In this study, a nonvolatile p-GaN/ZnGa2O4/BaTiO3/n-ITO ferroelectric optoelectronic memory is demonstrated. By combining with wide-bandgap semiconductors ZnGa2O4 and GaN, known for their excellent optoelectronic properties, the device exhibits superior self-powered ultraviolet photodetection performance. At 0 V bias, the device achieves a peak responsivity of 7 mA/W with a fast response speed (rise time: 6 ms and fall time: 12 ms). Furthermore, by adjusting the polarization direction of the BaTiO3 thin film, the optoelectronic performance of the device can be modulated to achieve memory functionality. The photocurrent of the device in the up-polarized state remains stable for over 5 months, indicating excellent long-term storage characteristics. Based on these properties, a 5 × 5 ferroelectric optoelectronic memory array capable of imaging, storing, and reading out has been demonstrated. Additionally, the device can function as “AND” and “OR” logic gates depending on its initial polarization state and input signals. The results provide an avenue for the application of ferroelectric optoelectronic memory in integrated sensing, memory, and computing systems.