The Mid-InfraRed Instrument (MIRI) on the James Webb Space Telescope (JWST) provides measurements over the wavelength range 5 to 28.5 µm. MIRI has, within a single 'package', four key scientific functions: photometric imaging, coronagraphy, single-source low-spectral resolving power (R ∼ 100) spectroscopy, and medium-resolving power (R ∼ 1500 to 3500) integral field spectroscopy. An associated cooler system maintains MIRI at its operating temperature of <6.7 K. This paper describes the driving principles behind the design of MIRI, the primary design parameters, and their realisation in terms of the 'as-built' instrument. It also describes the test programme that led to delivery of the tested and calibrated Flight Model to NASA in 2012, and the confirmation after delivery of the key interface requirements.