When a system thermalizes it loses all memory of its initial conditions. Even within a closed quantum system, subsystems usually thermalize using the rest of the system as a heat bath. Exceptions to quantum thermalization have been observed, but typically require inherent symmetries(1,2) or noninteracting particles in the presence of static disorder(3-6). However, for strong interactions and high excitation energy there are cases, known as many-body localization (MBL), where disordered quantum systems can fail to thermalize(7-10). We experimentally generate MBL states by applying an Ising Hamiltonian with long-range interactions and programmable random disorder to ten spins initialized far from equilibrium. Using experimental and numerical methods we observe the essential signatures of MBL: initial-state memory retention, Poissonian distributed energy level spacings, and evidence of long-time entanglement growth. Our platform can be scaled to more spins, where a detailed modelling of MBL becomes impossible.