A decade of intense research on two-dimensional (2D) atomic crystals has revealed that their properties can differ greatly from those of the parent compound. These differences are governed by changes in the band structure due to quantum confinement and are most profound if the underlying lattice symmetry changes. Here we report a high-quality 2D electron gas in few-layer InSe encapsulated in hexagonal boron nitride under an inert atmosphere. Carrier mobilities are found to exceed 1,000 and 10,000 cm2/Vs at room and liquid-helium temperatures, respectively, allowing the observation of the fully-developed quantum Hall effect. The conduction electrons occupy a single 2D subband and have a small effective mass. Photoluminescence spectroscopy reveals that the bandgap increases by more than 0.5 eV with decreasing the thickness from bulk to bilayer InSe. The band-edge optical response vanishes in monolayer InSe, which is attributed to monolayers mirror-plane symmetry. Encapsulated 2D InSe expands the family of graphene-like semiconductors and, in terms of quality, is competitive with atomically-thin dichalcogenides and black phosphorus.