IPv6 embraces various good features from the security perspective, but the improvements also bring us some new challenges for web content filtering. This paper presents a new framework of web content filtering in IPv6, which is helpful to purifying network environment. In this framework, using EM (Expectation maximization) algorithm, the active drift and self-learning mechanisms are proposed. Based on the new mechanisms, we can shield unknown illegal URLs effectively, and the illegal web content can be totally prevented from sneaking into the Intranet. Finally, our experimental results show that the performance of the system is very promising.