While he served as a minister, a person in the royal family of Wei named Tai Shuji (太叔疾) had married the daughter of Prince Zichao (子朝) of the State of Song.
Tai Shuji, however, continued to engage in an affair with the younger sister while he was married to Kong Yu's daughter.
When Kong Yu heard about this, he resolved to take military action against the State of Song.
[1] Kong Yu brought his daughter back to the State of Wei and arranged for her to marry Tai Shuji's brother Tai Shuyi (太叔遗), whom Kong Yu had helped to become the new monarch of the State of Wei.
In the Analects, there is a part where Zigong asked Confucius about why Kong Wenzi received this title.