Khvajeh Mohammad Safavi was a son of Shaykh Junayd, leader of the Safaviyya order (1447–1460), born by a Circassian concubine. He was an older (half)-brother of Shaykh Haydar, the successor of Shaykh Junayd as leader of the Safaviyya, as well as therefore the uncle of the founder of the Safavid dynasty, Ismail I. He had another brother named Khvajeh Jamshid, who was killed in southern Dagestan when he served during one of Shaykh Haydar's campaigns. Khvajeh Mohammad's only surviving sister, Shah-Pasha Khatun, was married to Mohammad Beg Talish, a military chief hailing from Khalkhal who would later become guardian (laleh) to Ismail I and who would play a pivotal role in the ascension of Ismail to power in the early 16th century.