Fault-tolerant quantum memory plays a key role in interfacing quantum computers with quantum networks to construct quantum computer networks. Manipulation of spin quantum memory generally requires a magnetic field, which hinders the integration with superconducting qubits. Completely zero-field operation is desirable for scaling up a quantum computer based on superconducting qubits. Here we demonstrate quantum error correction to protect the nuclear spin of the nitrogen as a quantum memory in a diamond nitrogen-vacancy center with two nuclear spins of the surrounding carbon isotopes under a zero magnetic field. The quantum error correction makes quantum memory resilient against operational or environmental errors without the need for magnetic fields and opens a way toward distributed quantum computation and a quantum internet with memory-based quantum interfaces or quantum repeaters. The efficacy of quantum error correction of spins in a diamond nitrogen-vacancy that uses magnetic fields depends on spin's location in the lattice. Here, an alternative, zero-field approach relying on geometric phase is demonstrated in a three-qubit system.