The invention relates to an intra-class coefficient scrambling-based JPEG image encryption method. The method comprises the following steps: firstly reading in a JPEG image file, acquiring a Huffman coding table and image data which undergoes JPEG coding compression, carrying out decoding to acquire all the non-zero quantized DCT coefficient numerical values and positions and carrying out classification; selecting a password, carrying out chaotic iteration by utilizing the password, so as to generate a chaotic sequence, and scrambling the non-zero coefficients and 8*8 block of each class by utilizing the chaotic sequence; and carrying out entropy coding on a scrambled quantized DCT coefficient matrix, and writing the coded data into the JPEG image file so as to complete intra-class coefficient scrambling-based JPEG image encryption. According to the method disclosed in the invention, scrambling is carried out on different classes of quantized DCT coefficients through the chaotic sequence, and the quantized DC coefficients and the non-zero AC coefficients are processed by directly using one encryption scheme, so that the safety and the high efficiency are both considered; and the encrypted images are similar to clear text image files in the aspect of size, and have high compression ratios.