His family was of Persian extraction (though he was almost certainly of mixed Persian-Chinese blood), having come to China through the Silk Road and settled in Anhui as youtiao vendors; Hu was a Chinese Muslim from the Hui ethnic group.
After Zhu's forces crossed the Yangtze River, they captured all of southern Anhui, most of Zhejiang, and other surrounding areas.
Hu received positions of leadership and led troops which defeated rival warlord Yang Wanzhe, leading other Miao chieftains Jiang Ying, Liu Zhen, and Li Fu to surrender.
He recommended several well-known scholars and officials from Zhejiang to the service of Zhu Yuanzhang (who later established the Ming dynasty and became its first emperor), including Liu Bowen, Song Lian, Ye Chen, and Zhang Yi.
Soon after their surrender, Jiang Ying invited Hu to perform a review of some crossbowmen at the Bayong Tower in Jinhua.