Homochirality is a signature of life on Earth, yet its origins remain an unsolved puzzle. Achieving homochirality is essential for a high-yielding prebiotic network capable of producing functional polymers like RNA and peptides on a persistent basis. Because of the chiral-induced spin selectivity effect, which established a strong coupling between electron spin and molecular chirality, magnetic surfaces can act as chiral agents and be templates for the enantioselective crystallization of chiral molecules. Here, we studied the spin-selective crystallization of racemic ribo-aminooxazoline (RAO), an RNA precursor, on magnetite (Fe3O4) surfaces, achieving an unprecedented enantiomeric excess (ee) of about 60%. Following the initial enrichment, we then obtained homochiral (100% ee) crystals of RAO after a subsequent crystallization. Our results demonstrate a prebiotically plausible way of achieving system-level homochirality from completely racemic starting materials, in a shallow-lake environment on early Earth where sedimentary magnetite deposits are expected to be common.