When a system thermalizes it loses all memory of its initialconditions. Even within a closed quantum system, subsystemsusually thermalize using the rest of the system as a heat bath.Exceptions to quantum thermalization have been observed,but typically require inherent symmetries1,2or noninteractingparticles in the presence of static disorder3–6. However, forstrong interactions and high excitation energy there are cases,known as many-body localization (MBL), where disorderedquantum systems can fail to thermalize7–10. We experimentallygenerate MBL states by applying an Ising Hamiltonian withlong-range interactions and programmable random disorder toten spins initialized far from equilibrium. Using experimentaland numerical methods we observe the essential signaturesof MBL: initial-state memory retention, Poissonian distributedenergy level spacings, and evidence of long-time entanglementgrowth. Our platform can be scaled to more spins, where adetailed modelling of MBL becomes impossible.