This paper proposes a novel mobile IPv6 header compression algorithm based on the draft RFC4944 issued by IETF. The algorithm improves the compression ratio of the IPv6 header through address assignment and coding arithmetic. The simulation shows that the compression rate can reach to 98.5% which is much better than the method proposed by the draft RFC4944. By taking audio transmission as the example to test, it is proved that the algorithm supports real-time traffic of mobile wireless sensor network (WSN).