The gamma-ray spectrum analysis is an important method for quantitative analysis of radionuclide. Although widely used, the weak peak identification and overlapping peaks resolution are still difficult for gamma-ray spectrum analysis. To solve the problem, a new method based on compressed sensing is proposed for improving gamma-ray spectrum analysis in this paper. The proposed method models physical modulation of gamma spectrometer as a linear equation, and formulates the gamma-ray spectrum analysis as a corresponding inverse problem. The true gamma spectrum is obtained by solving the inverse problem by applying sparsity constraint under the framework of compressed sensing. The feasibility of the proposed method is demonstrated by both numerical simulation and Monte Carlo simulation experiments. Results demonstrate that the proposed method can simultaneously resolve overlapped peaks and reduce the fluctuations of gamma-ray spectrum, effectively improving the accuracy of gamma-ray spectrum analysis.