Collective magnetic properties are usually associated with the d or f electrons that carry the individual magnetic moments. A fully spin-polarized ground state based on π electrons has been predicted in half-filled flat-band organic materials, but has remained experimentally challenging to realize. Here we show that isolated tetracyano- p-quinodimethane molecules deposited on graphene epitaxially grown on Ru(0001) acquire charge from the substrate and develop a magnetic moment of 0.4 μB per molecule. The magnetic moment survives even when the molecules form into a dimer or a monolayer, with a value of 0.18 μB per molecule for the monolayer. The self-assembled molecular monolayer develops spatially extended spin-split electronic bands, and we visualized the ground-state spin alignment using spin-polarized scanning tunnelling microscopy. The observation of long-range magnetic order in an organic layer adsorbed on graphene paves the way for incorporating magnetic functionalities into graphene.