Tokugawa Ieyasu’s father and Nobunaga’s father were enemies and always fought against each other (Oda clan vs. Matsudaira Clan).
Ieyasu was only 5 when he was kidnapped by the Oda clan members. Oda clan threatened to kill him if his father did not align with them. His father rejected but for some reason he was not killed.
He proved himself to be a good fighter and took the name of first Motonobu and then Motoyasu finally taking the name of Tokugawa Ieyasu. With the last name he was recognized as a descendant of the Minamoto clan who are the only ones who can take the position of Shogun.
After his fellow generals lost against Nobunaga, he signed a peace treaty with him. He supported Nobunaga in many wars and sieges.
In 1564, only 20 years after the introduction of rifles to Japan, he was shot by 2 bullets during the battle of Azukizaka but he survived because the armor protected him.
After killing Oda Nobunaga, Akechi Mitsuhide also wanted to kill Ieyasu, but Ieyasu managed to get back to his home Mikawa with the protection from Hattori Hanzo the greatest Ninja ever lived.
Ieyasu had a close relationship with Hideyoshi. In 1590 Hideyoshi gave Ieyasu the Kanto provinces where the modern day Tokyo is located. Some say Hideyoshi wanted Ieyasu to be far from him. Hideyoshi and Ieyasu always had some sort of complicated relationship.
Before Hideyoshi died, Ieyasu promised to protect Hideyoshi’s son and rule the country with the 5-elders council, but he started fortifying his bases in Kanto and gathering large troops.
The other 3 elders and Ishida Mitsunari wanted to kill Ieyasu. Ishida started approaching Tokugawa’s forces from south first surrounding the Fushimi Castle in Kyoto.
About 380 samurais were trapped inside and after their leader Mototada was killed, they chose to commit seppuku rather than surrendering. There was so much blood on the floor and the locals took the bloodstained wooden pieces and distributed to 7 different temples. Today you can view them at Yogen-In (20 mins from the Kyoto station) or Genko-An in Northwest Kyoto.
Ishida Mitsunari and Ieyasu’s sides forces eventually faced each other in the Sekigahara Valley on October 21, 1600. The Sekigahara battle was the largest battle in the history of Samurai with the inclusion of 170,000 men and more than 30 clans. More than 40,000 samurai were killed on that day and it was a clear victory for Ieyasu.
After the war, Ieyasu was declared as Shogun. He moved the capital to Tokyo (edo) and started building the Edo Castle. He also started the construction of Nijo castle in Kyoto for his residence to be used when visiting the emperor. It was the end of the Azuchi-Momoyama Period and the beginning of the Edo Period that lasted for 270 years.
Japan still was not completely united, clans in Western Japan were still loyal to Hideyoshi's son who had a very strong base in Osaka. Ieyasu sieged Osaka Castle in 1614. He could not capture it but signed a truce which gave the control of the castle to Ieyasu. In the following year Hideyoshi's son tried to kick out all of Ieyasus forces. Ieyasu then attacked Osaka castle again. There were huge clashes especially around the Tennoji temple, where Yukimura Sanada died. Eventually Osaka fell and Hideyoshi's son and his mother committed seppuku. That was the end of the warring states period.