Quantum networks, integrating quantum communication, quantum metrology, and distributed quantum computing, could provide secure and efficient information transfer, high-resolution sensing, and an exponential speed-up in information processing1. Deterministic entanglement distribution over long distances is a prerequisite for scalable quantum networks2–5. However, the exponential photon loss in optical fibres prohibits efficient and deterministic entanglement distribution. Quantum repeaters6, incorporating entanglement swapping4,7,8 and entanglement purification9–11 with quantum memories, offer the most promising means to overcome this limitation in fibre-based quantum networks. Despite numerous pioneering efforts12–25, a critical bottleneck remains, as remote memory-memory entanglement suffers from decoherence more rapidly than it can be established and purified over long distances. Here, we demonstrate memory-memory entanglement between two nodes connected by 10 km of spooled fibre surviving beyond the average entanglement establishment time. This is enabled by the development of long-lived trapped-ion memories, an efficient telecom interface, and a high-visibility single-photon entanglement protocol26,27. As an application, we report a proof-of-principle device-independent quantum key distributio (DI-QKD) demonstration with finite-size analysis over 10 km and a positive key rate over 101 km in the asymptotic limit, with both distances exceeding previous work by more than two orders of magnitude28–30. Our work provides a critical building block for quantum repeaters and marks an important step toward scalable quantum networks.