Born at Zamora, Sancho was the eldest son of Ferdinand the Great and Sancha of León. He was married to Alberta, known by name only from her appearance as Sancho's queen in contemporary charters. Chronicler William of Poitiers related that competition for the hand of a daughter of William I, king of England led to strife between two sons of Ferdinand I, and some historians have thus speculated that Sancho's wife, with her non-Iberian name, may have been the daughter in question. However, two later Norman chroniclers report that it was instead the betrothed of Alfonso VI, and not Sancho's wife Alberta, who was William's daughter.
After Ferdinand the Great defeated and killed his wife's brother in battle, Ferdinand was crowned King of León and Castile and called himself Imperator totius Hispaniae ("Emperor of all Spain"). When the kingdom was divided following Ferdinand's death in 1065, Sancho succeeded his father as King of Castile, while Sancho's younger brother Alfonso become King of León and his youngest brother García became king of the reestablished Kingdom of Galicia (partitioned from León). Each of the brothers was also assigned a sphere of influence among the Taifa states. Ferdinand also granted some holdings to his two daughters, giving Urraca control of the city of Zamora and Elvira the city of Toro, both enclaved within Alfonso's Kingdom of León.