In 1614 and 1615, Musashi participated in both the winter and summer battles in Osaka which erupted between the Toyotomi clan and the Tokugawa families. It’s unclear who he fought for. Later the same year, Musashi took a role as a construction supervisor for the service of Ogasawara Tadanao from Harima Province. Musashi helped in the construction of Akashi Castle and helped to organize the layout of Himeji town. During this time, he was occasionally forced to fight, and he defeated all opponents. He also taught martial arts, kenjutsu, and shuriken, and he perfected his Enmei-ryu kenjutsu style. During this period of service, he also adopted a son named Mikinosuke who became a vassal to the Himeji fief.
Musashi wandered across Japan again, and in Edo in 1623 wanting to become a kenjutsu teacher for the shogun. However, it was not accepted so he started to travel again as a ronin. He left Edo and went to Yamagata City, and adopted his second son, Iori. He established a kenjutsu school, however, it’s unknown where it was in Japan. Musashi trained some students and helped to suppress the Shimabara Rebellion in 1637.
Musashi took the position as a retainer of Hosokawa Tadatoshi who was a Lord of Kumamoto in 1640. Two years later, he suffered from neuralgia attacks, and felt that death is near. Next year, he retired to a cave named Reigando to write his “Gorin no sho” and finished it in 1645, giving it to his student. He wrote “Hyoho Sanjugokajo
(兵法三十五箇条)” and “Dokkodo (獨行道)”, too. In his later years, Musashi was also a cultural person. He liked calligraphy and ink painting, and made sword equipment such as Menuki (hilt ornaments). He died in Reigando cave on June 13, 1645.