He served as personal secretary to the next shōgun, Tokugawa Ietsuna, for a time, before being appointed wakadoshiyori (junior councillor) in 1670. Ietsuna was already quite ill when Masatoshi was appointed rōjū in 1679, and died the following summer. At this time, another rōjū, Sakai Tadakiyo, in a bid for personal power, proposed that the next shōgun be selected from the princely houses. He sought to be regent to this new shōgun, who would be made a puppet ruler. However, Masatoshi, said to have been infuriated, voiced strong opposition to this scheme; Tadakiyo resigned his post shortly afterwards, and Ietsuna's brother Tokugawa Tsunayoshi was installed as the new shogun.
