The invention discloses a planar memristor and a preparation method thereof, the structure of the memristor is the last planar structure of a substrate, the memristor comprises an active electrode atone end, an inert electrode at the other end and a two-dimensional atomic crystal in the middle of the electrode, and the two-dimensional atomic crystal is a single crystal IV-VI group semiconductor and is in the shape of MX (M: Ge, Sn, Pb; x: S, Se), which are fast ion conductors and have unique folded layered structures, so that when the memristor is subjected to the action of an electric field,oxidized metal cations from an active electrode can be quickly migrated among layers, vacancies or special channels of an interface of a two-dimensional atomic material, thereby realizing the memristor with excellent performances such as low power consumption, good cycle consistency, large switching ratio and the like. In addition, the preparation method provided by the invention is simple and easy to implement, has a wide application prospect in resistive random access memories and artificial synaptic devices needing low power consumption, and also provides a new thought for memristor preparation.