Masako Hōjō was born in 1157. She was the eldest daughter of Hojo Tokimasa and his wife, Hōjō no Maki. Masako's parents were still in their teens, and she was raised by many nursemaids and ladies-in-waiting. Masako was born into a world of war and strife. In Kyoto, the capital of Japan, where Cloistered Emperor Toba and Emperor Sutoku were warring over succession to the throne, the Hōgen Rebellion had broken out. The Hōjō family wisely chose to stay out of the rebellion, even though Masako's lineage was descended from the Taira clan and was therefore related to the imperial family.
During the Heiji Rebellion, in 1159, the Taira clan, under Taira no Kiyomori, with the support of Cloistered Emperor Go-Shirakawa defeated the Minamoto clan, under the leadership of Minamoto no Yoshitomo. Yoshitomo was executed, and his sons and daughters were either executed or sent to nunneries. Only three of his sons survived. Minamoto no Yoshitsune and Minamoto no Noriyori were forced into the priesthood, while Minamoto no Yoritomo, only thirteen, was spared and sent to exile in Izu, the domain of Hōjō Tokimasa. Masako was barely an infant while all this was taking place. The Taira clan, under Kiyomori, had successfully taken control of Japan.
Masako had an elder brother, Hōjō Munetoki, and in 1163 a younger brother, Yoshitoki, was born. Later another brother, Hōjō Tokifusa would be born, and another sister, whose name is lost to history. Until her marriage in 1179, Masako lived the life of a tomboy, horseback riding, hunting, and fishing, and eating with the men rather than with her mother, sister, and the other women of the household.