THESEUS is one of the three missions selected by ESA as fifth medium class mission (M5) candidates in its Cosmic Vision science program, currently under assessment in a phase A study with a planned launch date in 2032. THESEUS is designed to carry on-board two wide and deep sky monitoring instruments for X/gamma-ray transients detection: a wide-field soft X-ray monitor with imaging capability (Soft X-ray Imager, SXI, 0.3 - 5 keV), a hard X-ray, partially-imaging spectroscopic instrument (X and Gamma Imaging Spectrometer, XGIS, 2 keV - 10 MeV), and an optical/near-IR telescope with both imaging and spectroscopic capability (InfraRed Telescope, IRT, 0.7 - 1.8 $mu$m). The spacecraft will be capable of performing fast repointing of the IRT to the error region provided by the monitors, thus allowing it to detect and localize the transient sources down to a few arcsec accuracy, for immediate identification and redshift determination. The prime goal of the XGIS will be to detect transient sources, with monitoring timescales down to milliseconds, both independently of, or following, up SXI detections, and identify the sources performing localisation at < 15 arcmin and characterize them over a broad energy band, thus providing also unique clues to their emission physics. The XGIS system consists of two independent but identical coded mask cameras, arranged to cover 2 steradians . The XGIS will exploit an innovative technology coupling Silicon Drift Detectors (SDD) with crystal scintillator bars and a very low-noise distributed front-end electronics (ORION ASICs), which will produce a position sensitive detection plane, with a large effective area over a huge energy band (from soft X-rays to soft gamma-rays) with timing resolution down to a few $mu$s.Here is presented an overview of the XGIS instrument design, its configuration, and capabilities.