In insecure communication environments where the communication bandwidth is limited, important image data must be compressed and encrypted for transmission. However, existing image compression and encryption algorithms suffer from poor image reconstruction quality and insufficient image encryption security. To address these problems, this paper proposes an image-compression and encryption scheme based on a newly designed hyperchaotic system and two-dimensional compressed sensing (2DCS) technique. In this paper, the chaotic performance of this hyperchaotic system is verified by bifurcation diagrams, Lyapunov diagrams, approximate entropy, and permutation entropy, which have certain advantages over the traditional 2D chaotic system. The new 2D chaotic system as a pseudo-random number generator can completely pass all the test items of NIST. Meanwhile, this paper improves on the existing 2D projected gradient (2DPG) algorithm, which improves the quality of image compression and reconstruction, and can effectively reduce the transmission pressure of image data confidential communication. In addition, a new image encryption algorithm is designed for the new 2D chaotic system, and the security of the algorithm is verified by experiments such as key space size analysis and encrypted image information entropy.