According to "Book of Later Han", Wang Yun was from Qi County, Taiyuan. His family had many members who had served as administrative officials in the regional government for generations. Wang Yun himself was an official at the age of 19, and became the Inspector of Yu Province (). However, later he failed in the power struggle with the eunuch Zhang Rang. He had to abandon his position and hide himself in the countryside. After the death of Zhang Rang, the general He Jin came into power, and Wang Yun was promoted to the Gentleman of the Household and later to the Intendant of Henan ().