A memristor is a two-terminal device with nonvolatile resistive switching (RS) behaviors. Recently, memristors have been highly desirable for both fundamental research and technological applications because of their great potential in the development of high-density memory technology and neuromorphic computing. Benefiting from the unique two-dimensional (2D) layered structure and outstanding properties, 2D materials have proven to be good candidates for use in gate-tunable, highly reliable, heterojunctioncompatible, and low-power memristive devices. More intriguing, stable and reliable nonvolatile RS behaviors can be achieved in multi-and even monolayer 2D materials, which seems unlikely to be achieved in traditional oxides with thicknesses less than a few nanometers because of the leakage currents. Moreover, such two-terminal devices show a series of synaptic functionalities, suggesting applications in simulating a biological synapse in the neural network. In this review article, we summarize the recent progress in memristors based on inorganic and organic 2D materials, from the material synthesis, device structure and fabrication, and physical mechanism to some versatile memristors based on diverse 2D materials with good RS properties and memristor-based synaptic applications. The development prospects and challenges at the current stage are then highlighted, which is expected to inspire further advancements and new insights into the fields of information storage and neuromorphic computing.