明实录
A 1499 entry in the Ming Shilu recorded that Wu Rui was one of thirteen Chinese men from Wenchang who were captured by the Vietnamese after their ship was blown off course while traveling from Hainan to Guangdong's Qin subprefecture (modern day Qinzhou in Guangxi), after which they ended up near the coast of Annam (Dai Viet or Vietnam), during the Chenghua Emperor's rule (1447 - 1487) . Twelve of them were enslaved to work as agricultural laborers, but since he was the youngest, Wu Rui was selected for castration since he was the only young man and became a eunuch attendant at the Vietnamese imperial palace in Thang Long. After years of service, he was promoted at the death of the Vietnamese ruler in 1497 to a military position in northern Vietnam. A soldier told him of an escape route back to China and Wu Rui escaped to Longzhou. The local chief planned to sell him back to the Vietnamese, but Wu was rescued by the Pingxiang magistrate and then was sent to Beijing to work as a eunuch in the palace.