Two-dimensional (2D) layered materials have many features suitable for optoelectronic devices, but poor quality substrates can degrade optical properties. By encapsulating a monolayer semiconductor in layers of atomically-thin hexagonal boron nitride, a nearly pristine environment can be achieved free from surface roughness and defects of typical substrates.