Few facts about al-Khujandi's life are known. What little we know comes through his writings which have survived and also some comments made by Nasir al-din al-Tusi. From al-Tusi's comments we can be fairly certain that al-Khujandi came from the city of Khujand. The city lies along both banks of the Syrdarya river, at the entrance to the fertile Fergana Valley, and it was captured by the Arabs in the 8th century. Al-Tusi says that al-Khujandi was one of the rulers of the Mongol tribe in that region so he must have come from the nobility.
Al-Khujandi was supported in his scientific work for most of his life by members of the Buyid dynasty. The dynasty came to power in 945 when Ahmad ad-Dawlah occupied the 'Abbasid capital of Baghdad. Members of Ahmad ad-Dawlah's family became rulers in different provinces and there was never a great deal of cohesion in the Buyid empire. Al-Khujandi received patronage from Fakhr ad-Dawlah who ruled from 976 to 997.
It was Fakhr ad-Dawlah who supported al-Khujandi in his major project to construct a huge mural sextant for his observatory at Rayy, which is near modern Tehran. It was believed by many Arabic scientists that the larger an instrument was, the more accurate were the results obtained. In fact al-Khujandi's mural sextant was his own invention and it did break new ground in having a scale which indicated seconds, a level of accuracy never before attempted.
During the year 994 al-Khujandi used the very large instrument to observe a series of meridian transits of the sun near the solstices. He used these observations, made on 16 and 17 June 994 for the summer solstice and 14 and 17 December 994 for the winter solstice, to calculate the obliquity of the ecliptic, and the latitude of Rayy. He described his measurements in detail in a treatise On the obliquity of the ecliptic and the latitudes of the cities.