linguistic:paraphrasing, stylistic:tone, structural:summarization, quality:correction
Capture and service

Zheng He was captured by the Ming armies in Yunnan in 1381. General Fu Youde saw Ma He on a road and approached him to inquire about the location of the Mongol pretender. Ma He responded defiantly by saying that the Mongol pretender had jumped into a lake. Then the general took him prisoner. He was castrated between the ages of 10 and 14, and placed in the service of the Prince of Yan.

Ma He was sent to serve in the household of Zhu Di, the Prince of Yan, who later became the Yongle Emperor. Zhu Di was 11 years older than Ma. Enslaved as a eunuch servant, Ma He eventually gained the confidence of Zhu Di, who, as his benefactor, gained the allegiance and loyalty of the young eunuch. The prince had been governing Beiping (modern Beijing) since 1380. It was near the northern frontier with hostile Mongol tribes. Ma spent his early life as a soldier on the northern frontier. and often participated in Zhu Di's military campaigns against the Mongols. On 2 March 1390, Ma accompanied the prince when he commanded his first expedition, which was a great victory, as the Mongol commander Naghachu surrendered as soon as he realized he had fallen into a trap.

Eventually, he gained the confidence and trust of the prince. Ma was also known as "Sanbao" during his service in the household of the Prince of Yan, a reference to the Buddhist Three Jewels. Ma received a proper education at Beiping, which he would not have had if he had been placed in the imperial capital of Nanjing as the Hongwu Emperor, the father of Zhu Di, did not trust eunuchs and believed that it was better to keep them illiterate. The Hongwu Emperor purged and exterminated much of the original Ming leadership and gave his enfeoffed sons more military authority, especially those in the north, like the Prince of Yan.