In 1159, when Tokimasa was still a young man, a struggle broke out between the Taira and the Minamoto families. Known as the Heiji uprising, it ended in the defeat and death of the Minamoto leader Yoshitomo and the exile of his son Yoritomo to the province of Izu.
Though Yoritomo was technically a criminal, Hojo Tokimasa treated him generously, giving him his daughter Masako for a wife and supporting him in his efforts to overthrow the Taira. When these efforts proved successful and Yoritomo founded the Kamakura shogunate, Tokimasa continued to assist him, negotiating on his behalf with the court and persuading the emperor to recognize the newly established shugo (constables) and jito (stewards) system.
In 1199 Yoritomo died, and his son Yoriie became shogun, but in 1203 Tokimasa replaced him with another son of Yoritomo, Sanetomo, and created the position of shikken (regent) for himself, which allowed him to act as assistant to the shogun and exercise the actual power of government. The office of shikken passed down to Tokimasa’s descendants, fifteen of them holding it in succession; in this way the Hojo family continued to control the Kamakura shogunate.