Two- or three-dimensional metals are usually well described by weakly interacting, fermionic quasiparticles. This concept breaks down in one dimension due to strong Coulomb interactions. There, low-energy electronic excitations are expected to be bosonic collective modes, which fractionalize into independent spin- and charge-density waves. Experimental research on one-dimensional metals is still hampered by their difficult realization, their limited accessibility to measurements, and by competing or obscuring effects such as Peierls distortions or zero bias anomalies. Here we overcome these difficulties by constructing a well-isolated, one-dimensional metal of finite length present in MoS2 mirror-twin boundaries. Using scanning tunneling spectroscopy we measure the single-particle density of the interacting electron system as a function of energy and position in the 1D box. Comparison to theoretical modeling provides unambiguous evidence that we are observing spin-charge separation in real space.