The invention provides an information hiding and extracting method based on integer DCT (Discrete Cosine Transformation) coefficient modulation. An N-dimensional 2N+1-order magic cube matrix is constructed, carrier coefficients are respectively mapped in the N-dimensional 2N+1-order magic cube matrix by taking N carrier coefficients as a group, so as to obtain a mapping value, a value of to-be-embedded 2N+1 system number secret information is compared with the mapping value, if the two values are equal, the group of the carrier coefficients do not need to be modified, if the two values are not equal, only one carrier coefficient needs to be modified, so that the mapping value is equal to the to-be-embedded value, one carrier coefficient is modified, so that the embedding of formula bits of the secret information is completed, the embedding efficiency reaches up to formula, and the modification rate of the carrier coefficient is only 1/N, so that a computing process is simple, and the information hiding and extracting efficiency is improved.