The Spectral Imaging of the Coronal Environment (SPICE) instrument is a high-resolution imaging spectrometer operating at extreme ultraviolet (EUV) wavelengths. In this paper, we present the concept, design, and pre-launch performance of this facility instrument on the ESA/NASA Solar Orbiter mission. The goal of this paper is to give prospective users a better understanding of the possible types of observations, the data acquisition, and the sources that contribute to the instrument's signal. The paper discusses the science objectives, with a focus on the SPICE-specific aspects, before presenting the instrument's design, including optical, mechanical, thermal, and electronics aspects. This is followed by a characterisation and calibration of the instrument's performance. The paper concludes with descriptions of the operations concept and data processing. The performance measurements of the various instrument parameters meet the requirements derived from the mission's science objectives. The SPICE instrument is ready to perform measurements that will provide vital contributions to the scientific success of the Solar Orbiter mission.