Two-dimensional materials (2DMs) have gained significant interest for resistive-switching memory toward neuromorphic and in-memory computing (IMC). To achieve atomic-level miniaturization, we introduce vertical hexagonal boron nitride (h-BN) memristors with graphene edge contacts. In addition to enabling three-dimensional (3D) integration (i.e., vertical stacking) for ultimate scalability, the proposed structure delivers ultralow power by isolating single conductive nanofilaments (CNFs) in ultrasmall active areas with negligible leakage thanks to atomically thin (∼0.3 nm) graphene edge contacts. Moreover, it facilitates studying fundamental resistive-switching behavior of single CNFs in CVD-grown 2DMs that was previously unattainable with planar devices. This way, we studied their programming characteristics and observed a consistent single quantum step in conductance attributed to unique atomically constrained nanofilament behavior in CVD-grown 2DMs. This resistive-switching property was previously suggested for h-BN memristors and linked to potential improvements in stability (robustness of CNFs), and now we show experimental evidence including superior retention of quantized conductance.