In March 935, Pak Yŏnggyu's father-in-law, Kyŏn Hwŏn was overthrown in a palace coup and imprisoned at Geumsansa Temple () by his oldest son,
Kyŏn Sin'gŏm, then in June, Kyŏn Hwŏn escaped and fled to
Goryeo. In September 936, after secretly discussing and consulting with his wife,
Princess Kyŏn Aebok, Pak sent an envoy to Goryeo to express his intention to defect and said that he would welcome the Goryeo army. Goryeo's king,
Wang Kŏn, then rejoiced greatly about this and treated that messenger generously and sent him back to Pak. Later, when Wang Kŏn finally won in attacked the
Later Paekche, Pak helped to contribute to the unification of
Later Three Kingdoms. After this, Wang Kŏn rewarded Pak Yonggyu with land of an area of 1,000
kyŏng (). Wang Kŏn also granted Pak's wife with 35 horses () and gave their two sons government posts. Due to Pak's contribution in helping Wang establish the new
Goryeo Dynasty, Pak became officially titled as one of the Threefold Great Rectifers (), along with
Yu Ch'ŏn'gung and
Hwangbo Che-gong. Since Pak was the one of Threefold Great Rectifers, both him and his wife had a good relationship with
Taejo of Goryeo, they regarded and treated each other like siblings. Because of this too, Pak's oldest daughter became 17th wife of Taejo and his other two daughters became the first and second wives of Taejo's son,
Jeongjong of Goryeo. == Family ==