Superconductivity is a striking example of a quantum phenomenon in which electrons move coherently over macroscopic distances without scattering. The high-temperature superconducting oxides (cuprates) are the most studied class of superconductors, composed of two-dimensional CuO2 planes separated by other layers that control the electron concentration in the planes. A key unresolved issue in cuprates is the relationship between superconductivity and magnetism. Here we report a sharp phase boundary of static three-dimensional magnetic order in the electron-doped superconductor La(2-x)Ce(x)CuO(4-δ), where small changes in doping or depth from the surface switch the material from superconducting to magnetic. Using low-energy spin-polarized muons, we find that static magnetism disappears close to where superconductivity begins and well below the doping level at which dramatic changes in the transport properties are reported. These results indicate a higher degree of symmetry between the electron and hole-doped cuprates than previously thought.