The fertile Fergana Valley was an important conduit on the Silk Roads (more precisely the North Silk Road), which connected the ancient Chinese capital of Xi'an to the west over the Wushao Ling Mountain Pass to Wuwei and emerging in Kashgar before linking to ancient Parthia,[2] or on to the north of the Aral and Caspian Seas to ports on the Black Sea.

The ancient kingdom referred to as Dayuan (大宛, "Great Yuan", literally "Great Ionians") in the Chinese chronicles is now generally accepted as being in the Ferghana Valley. It is sometimes, though less commonly, written as Dawan (大宛[3]). Dayuan were Greeks, the descendants of the Greek colonists that were settled by Alexander the Great in Ferghana in 329 BCE, and prospered within the Hellenistic realm of the Seleucids and Greco-Bactrians, until they were isolated by the migrations of the Yuezhi around 160 BCE. It has been suggested that the name "Yuan" was simply a transliteration of the words “Yona”, or “Yavana”, used throughout antiquity in Asia to designate Greeks (“Ionians”). Their capital was Alexandria Eschate.

The earliest Chinese visitor was the ambassador Zhang Qian, who passed through on his way to secure a military alliance with the Da Yuezhi or 'Great Yuezhi' against the Xiongnu, c. 127/126 BCE. The Shiji, Chap. 123 says:

    Dayuan lies southwest of the territory of the Xiongnu, some 10,000 li [4,158 km] directly west of China. The people are also settled on the land, plowing the fields and growing rice and wheat. They also make wine out of grapes. The region has many fine horses which sweat blood;[apparently due to skin parasites which caused sores] their forebears are supposed to have been foaled from heavenly horses. The people live in houses in fortified cities, there being some seventy or more cities of various sizes in the region. The population numbers several hundred thousand. The people fight with bows and spears and can shoot from horseback. Dayuan is bordered on the north by Kangju, on the west by the kingdom of the Great Yuezhi, on the southwest by Daxia (Bactria), on the northeast by the land of the Wusun, and on the east by Yumi (Keriya) and Yutian (Khotan)."[4]

Da Yuan appears as a powerful state in both the Shiji and the Hanshu. However, after Xian, king of Yarkand, conquered it about the middle of the 1st century CE, it gradually lost importance. The Hou Hanshu adds that Da Yuan sent tribute and offerings to the Chinese court in 130 CE along with Kashgar and Yarkand. After that, it is referred to as Liyi 栗弋 (preferably read Suyi 粟弋), and is specifically stated to be a dependency of Kangju.

By the time of the Weilüe (in the 3rd century CE), the old capital, Alexandria Eschate (modern Khujand), had become a separate kingdom called 'Northern Wuyi.'[5]

Zoroastrian literature identifies the area as the Zoroastrian homeland. It was known as "Özkent" during Karakhanid rule. Fergana also played a central role in the history of the Mughal dynasty of South Asia in that Omar Sheikh Mirza, chieftain of Farghana, was the father of Zahiruddin Muhammad Babur (1483–1530), founder of the Mughal dynasty in India. At Mirza's death in 1498, Babur became chief, although he was still a minor.

During the expansion of Russia in the nineteenth century the Russians invaded Turkistan, gradually taking it over between 1855 and 1884. They took the capital of the Kokand Khanate in 1873 and included it within what was named the Fergana province of the Russian empire.

Modern Fergana city was founded in 1876 as a garrison town and colonial appendage to Margelan (13.5 miles to the northwest) by the Russians. It was initially named New Margelan (Новый Маргелан), then renamed Skobelev (Скобелев) in 1910 after the first Russian military governor of Fergana Valley. In 1924, after the Bolshevik reconquest of the region in 1918–1920, the name was changed to Fergana, after the province of which it was the centre.[6] The Fergana canal was constructed in the 1930s.[7]