Nonvolatile memories based on van der Waals heterostructures have been proved to be promising candidates for next-generation data storage devices. However, little attention has been focused on the structure with separated floating and control gates (the floating gates and control gates distribute at the different side of the channels), which were recently predicted to be capable of further improving device performance. Here, nonvolatile multibit optoelectronic memories are demonstrated using MoS 2 , hexagonal boron nitride (h-BN), and graphene in a top-floating-gated structure. With separated top graphene floating gate, the devices show a large memory window (≈95 V) via sweeping gate voltage from 80 to −80 V, a high on/off ratio (≈10 6 ) with an ultralow dark current (≈10 −14 A), as well as excellent retention characteristic (≈10 4 s) and cyclic endurance. In addition, these devices can also be erased by a laser illumination with broadband spectrum after being electrically programmed. For the multilevel storage property, 7/6 stages controlled by different electrical operations, and 13/6/3 stages by different laser pulse illuminations are gained. The obtained results show a promising performance for nonvolatile optoelectronic memory using a top-floating-gated structure.