His father was Pinedjem I, who was the Theban High Priest of Amun and de facto ruler of Upper Egypt from 1070 BC, then declared himself pharaoh in 1054 BC and Masaharta succeeded him as high priest. His mother was probably Duathathor-Henuttawy, the daughter of Ramesses XI, last ruler of the 20th dynasty. His aunt Tentamun, another daughter of Ramesses married Pharaoh Smendes I, who ruled Lower Egypt. One of Masaharta's brothers was Psusennes I, who followed Smendes's successor, the short-lived Amenemnisu as pharaoh.