A motion analysis method based on video compression code stream, characterized in that, the method includes following steps: a total number of bits of a current macro block or a number of residual bits of a current macro block in a current video frame is extracted (101, 201) from video compression code stream; according to quantization algorithm defined by compression standard of the video compression code stream, the total number of bits of the current macro block is remapped to a total number of bits which is independent of quantization parameter, or the number of residual bits of the current macro block is remapped to a number of residual bits which is independent of quantization parameter, wherein the method of the remapping is that the total number of bits or the number of residual bits of the current macro block of the extracted frame is multiplied by a weighted value W which forms a monotonic increasing curve with the quantization parameter; a background value is obtained through performing (102, 204, 304, 403) weighted average of the remapped total number of bits or the remapped number of residual bits of macro blocks in the latest M frames whose positions correspond with the current macro block, in which M is a natural number; a motion vector of the current macro block in the current video frame is extracted from video compression code stream; difference value between the remapped total number of bits of the current macro block or the remapped number of residual bits of the current macro block and the background value is calculated; and then, either a moving object is determined that has been detected if the difference is greater than a predetermined first threshold; or a moving object is determined that has been detected if the difference is greater than a predetermined third threshold and the motion vector of the current macro block is greater than a predetermined second threshold, in which the predetermined first threshold is greater than or equal to the predetermined third threshold. a total number of bits of a current macro block or a number of residual bits of a current macro block in a current video frame is extracted (101, 201) from video compression code stream; according to quantization algorithm defined by compression standard of the video compression code stream, the total number of bits of the current macro block is remapped to a total number of bits which is independent of quantization parameter, or the number of residual bits of the current macro block is remapped to a number of residual bits which is independent of quantization parameter, wherein the method of the remapping is that the total number of bits or the number of residual bits of the current macro block of the extracted frame is multiplied by a weighted value W which forms a monotonic increasing curve with the quantization parameter; a background value is obtained through performing (102, 204, 304, 403) weighted average of the remapped total number of bits or the remapped number of residual bits of macro blocks in the latest M frames whose positions correspond with the current macro block, in which M is a natural number; a motion vector of the current macro block in the current video frame is extracted from video compression code stream; difference value between the remapped total number of bits of the current macro block or the remapped number of residual bits of the current macro block and the background value is calculated; and then, either a moving object is determined that has been detected if the difference is greater than a predetermined first threshold; or a moving object is determined that has been detected if the difference is greater than a predetermined third threshold and the motion vector of the current macro block is greater than a predetermined second threshold, in which the predetermined first threshold is greater than or equal to the predetermined third threshold.