We generalize BB84 quantum key distribution (QKD) to the scenario where the receiver adopts a heralded quantum memory (QM). With the heralded QM, the valid dark count rate of the receiver’s single photon detectors can be mitigated obviously, which will lower the quantum bit error rate, and thus improve the performance of decoy-state BB84 QKD systems in long distance range. Simulation results show that, with practical experimental system parameters, decoy-state BB84 QKD with QM can exhibit performance comparable to that of without QM in short distance range, and exhibit performance better than that without QM in long distance range.