Jin Midi was born in 134 BC to a royal Xiongnu family. He was the heir apparent to Xiongnu's Prince of Xiutu, one of the major princes under the supreme ruler of the Xiongnu, the Gunchen Chanyu. After Gunchen's death in 126 BC, his brother Yizhixie succeeded him. During this time, the Prince of Xiutu and another major prince, the Prince of Hunye, were responsible for defending Xiongnu's southwestern border with Han Dynasty – modern central and western Gansu. In 121 BC, Emperor Wu of Han sent his general Huo Qubing to attack Xiongnu, dealing a great defeat on the Xiongnu. In the campaign, Huo killed the Princes of Zhelan and Luhou, as well as 8,900 Xiongnu soldiers, while capturing the Prince of Hunye's son, chief assistant, and a number of officials, as well as golden statues that the Prince of Xiutu had forged to use to worship heaven. Yizhixie Chanyu was greatly displeased, and was considering summoning the Princes of Hunye and Xiutu to execute them. The princes, in fear, plotted to defect to Han. When Emperor Wu sent Huo to accept their surrender, the Prince of Xiutu changed his mind and tried to back out of defecting. The Prince of Hunye killed him and surrendered to Han, along with the region that he controlled. Because the Prince of Xiutu was killed, Midi, as well as his mother the princess, as well as his brother Lun, were confiscated to serve as imperial servants. Midi was assigned to the imperial stables.
During Emperor Wu's reign
On a later occasion, during an imperial feast, Emperor Wu ordered that horses be brought to him for him to examine. Midi, and a large number of fellow stable attendants, brought the horses, and as a number of Emperor Wu's beautiful concubines were in attendance, the attendants were struck by their beauty and were looking at them, but Midi did not dare to. Emperor Wu saw Midi and was impressed by his propriety, tall stature, and how healthy and strong the horses under Midi's care were. That same day, he awarded Midi robes and made him the director of the imperial stables, and thereafter became increasingly close to Midi. As he remembered that the Prince of Xiutu had used golden statues to worship heaven, Emperor Wu gave Midi the surname Jin, meaning "gold." When Jin Midi's mother died, Emperor Wu had her portrait drawn and displayed at his later favorite palace, Sweet Springs Palace, entitling the portrait, "The Princess of Xiutu". Two of Jin Midi's sons became close attendants to Emperor Wu and were favored by Emperor Wu. After one of the sons was grown, on one occasion, he was flirting with Emperor Wu's ladies in waiting when Jin Midi saw them. Jin Midi, in anger that his son's behavior was inappropriate, killed him, and then reported to Emperor Wu. Emperor Wu was greatly saddened but became even more impressed with Jin Midi. In 88 BC, the imperial official Ma Heluo was anxious over the fact that the clan of his friend Jiang Chong had been slaughtered by Emperor Wu. Jiang had falsely accused Emperor Wu's crown princeLiu Ju of treason in 91 BC, causing Liu Ju to rise in rebellion in fear, killing Jiang. Liu Ju was killed, but in the aftermaths, Emperor Wu, discovering that Jiang's accusations were false, had Jiang's clan slaughtered. He thus conspired with his brothers to assassinate Emperor Wu. The assassination attempt was thwarted by Jin, as when he saw Ma about to enter Emperor Wu's bedchambers with a knife, he grabbed and held Ma until other imperial guards could bind Ma. In 87 BC, Emperor Wu was seriously ill, and he created his youngest sonLiu Fuling crown prince. He summoned his close associates to his bedchambers to designate one of them, Huo Qubing's younger brotherHuo Guang, as regent. Huo initially declined, arguing that Jin was more capable, but Jin pointed out that he was ethnically Xiongnu and that the other officials and the Xiongnu might think of him lightly. Emperor Wu thus designated Huo as the primary regent, but also designated Jin and Shangguan Jie secondary regents. He soon died, and Liu Fuling took the throne as Emperor Zhao.
During Emperor Zhao's reign
In fall 86 BC, Jin Midi became seriously ill. Huo Guang, after discussing with Emperor Zhao, had Emperor Zhao approve a creation of Jin as the Marquess of Du on his bed. Jin died the next day and was buried near Emperor Wu's tomb. His family continued to serve as imperial servants until the end of the Western Han Dynasty, with seven generations in total.