The imaging spectrometer supplies spectral images in one spectral dimension and two spatial dimensions simultaneously. The Offner spectral imaging system was outstanding because of its small volume, light weight, free spectral smile and little keystone. However, the manufacture of the convex grating is a challenge and the cost is high. Here, an optical design of a compact 400-1000nm spectral imaging system using a planar grating based on a single freeform mirror was proposed. The spectrograph was similar with the Offner structure, only the grating is planar. The multi-spectra was split by the planar diffraction grating, and the collimating mirror and the focusing mirror were the same freeform surface by using it twice. The freeform surface was non-rotational symmetry. Its large degree of freedom can correct kinds of aberration, such as astigmatism, smile and keystone. The system has a compact volume as 120×100×100mm3. The entrance slit was 6mm, and the object NA(numerical aperture) was 0.12. The pixel size of the detector was 16μm×16μm, and its resolution was 375(spatial)×400(spectral). The design result showed that image quality close to the diffraction limit has been obtained. The maximums of the keystone and the smile at all working wavelengths in all fields were respectively 1.6μm and 7.5μm, which were both less than half of the pixel size. At last, the tolerance analysis considering manufacture and alignment of the system was done, the result showed that the manufacturability of the existing diamond turning machining technology can satisfy the accuracy need of the freeform mirror.