We present the spectral analysis system for the second-generation energetic X-ray imaging telescope experiment (EXITE2) balloon payload. EXITE2 is an imaging hard X-ray telescope using a coded-aperture mask and a NaI/CsI phoswich detector operating in the energy range 20-600 keV. The instrument was flown on a high-altitude scientific balloon from Ft. Sumner, NM on 7-8 May, 1997. We describe the details of the EXITE2 spectral analysis system, with emphasis on those aspects peculiar to coded-aperture instruments. In particular, we have made our analysis compatible with the standard X-ray spectral fitting package XSPEC by generating a response matrix in the appropriate format including all the effects of a coded-aperture system. The use of XSPEC, which may be a first for coded-aperture data, permits great flexibility in the fitting of spectral models. The additional effects of our phoswich system, or any other detector-specific considerations, may be easily included as well. We test our spectral analysis using observations of the Crab Nebula, and find that the EXITE2 Crab spectrum is consistent with those recorded by previous instruments operating in this energy range.