The invention discloses a method for hiding H. 264/AVC video data of an encrypted domain. The method comprises the process of encrypting H. 264/AVC videos, the process of hiding the H. 264/AVC video data of the encrypted domain, and the process of extracting hidden data. In the encryption process, code words of an Intra_4*4 prediction mode, code words of an Intra_16*16 prediction mode, code words with the non-zero motion vector difference and code words with a residual coefficient are encrypted. In the process of hiding the video data, a code word mapping method is adopted. The method has the advantages that video encryption and data hiding are conducted directly in an H. 264/AVC code stream domain, the videos do not need to be decoded or partially decoded, and application demands of real-time videos are met. The operation of equal-length code word replacement is conducted in the encryption and data hiding processes, code rate of an H. 264/AVC video stream is not increased, and accordingly the problem of data expansion in the encryption and data hiding processes is solved. Meanwhile, the encrypted video stream with the hidden data is completely compatible with an H. 264/AVC standard and can be decoded by a standard H. 264/AVC video decoder. The data extraction and decoding are conducted in a completely separated mode, and the practicability is higher.