Ferroelectrically driven nonvolatile memory is demonstrated by interfacing 2D semiconductors and ferroelectric thin films, exhibiting superior memory performance comparable to existing thin-film ferroelectric field-effect transistors. An optical memory effect is also observed with large modulation of photoluminescence tuned by the ferroelectric gating, potentially finding applications in optoelectronics and valleytronics.