We report on the first nanoelectromechanical memories based on two-dimensional (2D) molybdenum disulfide (MoS 2 ) resonators with Duffing nonlinearity. The local-gate Mos 2 resonators show spring hardening at large drive amplitude, and the unstable solution leads to a resonance response that is related to the direction of frequency sweep. Such frequency hysteresis further results in a nanomechanical memory: by choosing the reference frequency $(f_{\text{ref}})$ to be within the frequency range of unstable solution $(\Delta f)$, the responses at $f_{\text{ref}}$ under upward and downward frequency sweeps show clear difference in amplitude, forming a novel memory based on 2D nanoelectromechanical systems (NEMS). We experimentally demonstrate circular “drumhead” 2D Mos 2 Nems resonators with capacitive driving using the local gate electrodes and optical detection, which shows excellent memory characteristics. These devices work robustly without a bit error during 50 cycles of voltage pulses, with a tuned on/off ratio by setting the $f_{\text{ref}}$ position. These memories based on 2D NEMS resonators establish the foundation for more complex NEMS logic and memory circuits based on individually-addressable 2D NEMS resonators, towards a scaled, ultralow-power $(\sim10^{-12}\ \mathrm{W})$, fast and highly tunable integrated computing system based on resonant 2D membranes.