Wei Wen

His father was Wei Xuanyan (韋玄儼), who served as a prefectural prefect late in the reign of Emperor Gaozong.

After Emperor Gaozong's death in 683, Li Zhe took the throne (as Emperor Zhongzong), but soon ran afoul of his mother Empress Dowager Wu (later known as Wu Zetian), who retained power as regent, partly over his desire to promote Wei Xuanzhen to be chancellor.

In 710, Emperor Zhongzong died suddenly—a death that traditional historians believed to be a poisoning carried out by Empress Wei and her daughter Li Guo'er the Princess Anle, so that Empress Wei could eventually be "emperor" like Wu Zetian, and Li Guo'er could be crown princess.

Wei Wen and another chancellor, Zong Chuke, however, opposed this plan on the grounds that this would require her and Li Dan to frequently confer, which violated Confucian principles that a brother-in-law and a sister-in-law should not converse with each other.

Under Zong's and Wei Wen's insistence, the other chancellors did not dare to oppose their will, and Li Dan was not made coregent.