Born in 1714, Sakai Tadayoshi succeeded to the headship as adopted heir in 1732, becoming the 3rd lord of Dewa-Matsuyama Domain. The domain had been founded in 1647 when Sakai Tadatsune, third son of Shonai Domain lord Sakai Tadakatsu, was granted 20,000 koku, initially building only a moated residence at Nakayama village. In 1760, Tadayoshi was appointed shogunal wakadoshiyori (junior councilor), the first member of the Shonai Sakai family to enter the shogunate's inner government. In 1779, in recognition of his service, he was granted an additional 5,000 koku in Kozuke Province, expanding the domain from 20,000 to 25,000 koku and earning castle-holder status. In 1781, following a design by the Shonai military scholar Nagasaka Judayu, he began converting the residence into a proper castle, completing the earthworks, moats, and walls of the second and third enclosures (excluding the main keep) by 1787.