He hailed from Hedong 河東 (south of modern Shanxi) and was assistant to the commander (cheng 丞) of the Southern and Northern metropolitan armies (nanbeijun 南北軍) and had made himself a name by punishing an officer who had broken a gate through the wall of the garrison of the Northern Army in order to set up a merchant shop. Hu Jian was for his dutiful behaviour promoted to magistrate (ling 令) of Weicheng 渭城, where he proved to be an excellent official.
During the reign of Emperor Zhao 漢昭帝 (r. 87-74 BCE), the imperial sister, Princess Zhang 長公主, was involved into the murder by her lover, Ding Wairen 丁外人, of a former opponent. Nobody dared arresting the assassin Ding Wairen had sent because he took refuge in the apartments of the Princess. Only Hu Jian, who was known for his justness and righteousness, brought the assassin to trial.
Later, when the Shangguan An 上官安, protector of Ding Wairen, rose to power, Hu Jian was arrested and commited suicide.