After passing the examination, Kim entered government service, holding a wide range of positions. He earned the special favor of King Seongjong, as well as the enmity of the Hungupa (Loyal Retainers) faction.