For two centuries historians have tried to link the Xiongnu, a nomadic pastoral people first heard of in Mongolia, with the Huns who began appearing in Europe and western Asia from around AD 370. The current state of the argument is "not proven". No universally acceptable evidence has emerged from linguistics (despite the similarity of the names), archaeology (similar cauldrons found in both areas are thought insufficient proof), or climate studies (it's been suggested that extreme events in Siberia could have triggered a migration). If the Huns were Xiongnu who migrated west, we have no way at present to prove it. But it's still a tempting hypothesis! I'll deal separately with these two peoples who significantly influenced events in Iran.
THE XIONGNU
The Xiongnu, speakers of a Proto-Turkic language, expanded from their homeland in what's roughly modern Mongolia to create the first nomad empire, between 200 BC and 100 AD. They were the most persistent enemies of the Qin and Han Chinese dynasties, until they were defeated by the Xianbei, another nomad people from Manchuria, in 155 AD. If the Hun/Xiongnu continuity theory is correct, some at least of the Xiongnu must have hung on to their name and their identity, despite apparent absorption into the Xianbei. But Chinese sources record Xiongnu later living north of the Altai area - some way north and west of the orginal heartland. Two movements need to have occured: from Mongolia to the Altai (in 2nd century); from Altai to Central Asia in the 4th century. The only almost certain fact is the consistency of the name. Xiongnu in Chinese means "howling slaves" - a hostile distortion of Hun which appears as Χοῦνος (Khounos) in Greek, Xwn in Sogdian and Huna in Indian texts. Huna is translated by Xiongnu from 3rd century AD onwards by Chinese writers. The Huns crossed the Volga (traditionally) in 370 AD. Exactly who they were and how they got there from the Altai region of Siberia is unknown. But many now believe that they were the "linguistic, cultural and political heirs of the Xiongnu." (Baumer, Central Asia II).
The Xiongnu and China
Chinese dynasties had long feared "barbarian" neighbours to the north - and had begun to build defences against them - forerunners of the Great Wall. To defend themselves, as well as walls, the Chinese needed horses - since developing horse-archers, they'd been able to hold their own against the northern threat - which by 244 BC included the Xiongnu. But horses could only be had from the northern nomads; they paid for them with silk. This dangerous dependency was changed by the "First Emperor" - Qin Shi Huang (221 - 210 BC). He drove the Xiongnu back beyond the Yellow River (Huang Ho), and consolidated his victories with building the Great Wall (2,500 kilometres in length) - hereafter the boundary between China and the alien world of the steppe.
Part of Wudi's extension to the Great Wall. Pounded earth section of 60 km wall. Around 100 BC
After Qin Shi Huang the First Emperor died - and was interred in his vast tomb with his terracotta warriors, chariots and other goods - the Xiongnu exploited the ensuing chaos by invading northen China. Additionally under their dynamic leader Modu Chanyu (Maodun), they defeated first the Mongolid Donghu to the east, and then, in 201 or 208 BC, in an overwhelming victory, the Europoid Yuezhi to their west, driving them further west (They suffered further crushing defeats under Modu's successor in 173 and 162 BC). Soon the Xiongnu confederation controlled trade routes as far as the Caspian. But Modu's successful organisation and modernisation of the Xiongnu in due course weakened the nation. It became addicted to Chinese luxury goods, and the harsh nomadic lifestyle gradually softened: in 198 BC, they gave up raiding China (in theory, though not in practice), in return for a tribute consisting of gold, jewels, alcohol, and luxury foodstuffs. The Han emperor Wendi wrote in 162 BC:
The land north of the Great Wall, where men wield bow and arrow, receives its commands from the chanyu [Xiongnu leader], while within the wall, whose inhabitants dwell in houses, and wear hats and girdles, is to be ruled by us.
The Han emperor Wu (141 - 87 BC) carried out important military reforms - especially relating to the crossbow, scale armour and horse-breeding. Thus prepared he went on the offensive: his object being to stop Xiongnu incursions, and force them to move northwards. Chinese attacks were successful, driving the Xiongnu beyond the Gobi desert by around 122 BC. But before Wu could strike at the enemy heartland, he felt he needed allies.
Zhang Qian's mission
Wudi hoped the Yuezhi, who hated the Xiongnu after their humiliating defeats [above], would be those allies. A courtier, Zhang Qian offered to explore the possibility (139 BC) , but was captured en route by the Xiongnu. Though he was well-treated, he was held prisoner for 10 years: he then escaped and continued his mission, following the Yuezhi's path to the west - through Fergana, Sogdia to Bactria, where he finally caught up with them. They were not interested in allying with the Chinese, but Zhang Qian did spend a year collecting fascinating information about the lands to the west. He returned to Wudi in 126, after another spell as prisoner of the Xiongnu. Though he drew a blank militarily, Zhang Qian's intelligence encouraged Wudi to explore the idea of developing trade - the beginning of the Silk Route. Tales of the heavenly horses of Ferghana also sounded to Wudi like the ideal solution to his shortage of war-horses. See aslo CHINA
Decline and fall of the Xiongnu empire
Wudi, even without allies, now moved to attack the Xiongnu in their own territory (121 BC). After early success, in 119 BC he crossed the Gobi and annihilated an army of 70,000 near Ulaan Baatar (Battle of Mobei). After another defeat, the Xiongnu were finished as a serious power. Wudi consolidated by securing his frontier all the way to Ferghana - he now needed those horses urgently, having lost three-quarters of his own in the campaign. By 111 BC, he'd reached Dunhuang, and the narrow Gansu (Hexi) corridor - the road west squeezed between Tibet and the Gobi - was under Chinese control. In 104 BC, they had cleared the route through the Tarim basin as far as Ferghana. Wudi, though, had to display overwhelming force before he could get his precious horses. His general returned to China in 101 BC with sufficient bloodstock to transform the Han cavalry - and also seeds of the nutritious crop they fed on (lucerne). Miltary pressure on the Xiongnu was maintained: but the end was a result of self-inflicted destruction. After a decade of civil war (58 - 52 BC), one faction was allowed to settle in Chinese territory (semi-desert south of the Gobi). The rival faction was crushed when the Chinese stormed their fort on the River Talas (36 BC). A shrunken relic of the once mighty Xiongnu empire continued to exist, until they were finally eliminated by the Xianbei, descendants of their eastern Mongolian neighbours the Donghu, in AD 155. It's possible that detachments of the Xiongnu found their way westward towards the Aral Sea.
THE HUNS
The people called Huns emerging from Central Asia in the 4th and 5th centuries AD are referred to by several different names, most commonly: Chionites (350s), Kidarites (370s or 420s), Alkhans (now mostly recognised as distinct from the Hephthalites) and Hephthalites (450s; also called the White Huns). The names probably refer to distinct groups of Huns in Central Asia - rather than successive waves of one people.
Chionites
Shapur II was distracted from his work in consolidating the western frontier of his empire by a nomad invasion in the north east. He halted their advance probably somewhere on the Amu Darya (Oxus).
Sapor [Shapur] was at the furthest limit of his realm, where it was costing him much bloodshed to keep certain hostile tribes at bay.Ammianus Marcellinus 16.9
Ammianus implies that these tribes included the Chionites. The Romans he'd been fighting wanted to make peace, but Shapur allied instead with the Chionites (under their king Grumbates) and invaded Roman territory, seeing the offer of peace as a sign of weakness. But the Chionites continued thier incursions in the east - conquering Sogdia and Bactria, and making their capital at Balkh: they twice defeated Shapur II, according to Armenian sources. between 368 and 378. The Chionites and their successors made trouble for the Sasanians for many years - during which Bactria was constantly pillaged, and agriculture declined catastrophically.
Kidarites and Hephthalites
Possibly named after Kidara (whose name is found on coins from northern Gandhara and Tocharistan dated to around AD 390), and possibly descended from the Chionites - in any event they drove the Chionites from Bactria in the 420s, moving south into Gandhara and the Punjab, and north into Sogdia. But within a couple of decacades the Kidarites had succumbed to another Hun nation, the Hephthalites. The Sasanian king Peroz I, who had regained his throne with Hephthalite help, defeated the Kidarites in 467-8: but was crushed three times by the Hephthalites. The Hephthalites controlled Bactria and Sogdia by the early 6th century - and were pursuing trade and diplomatic initiatives with China. But in 560, the Sasanian king Khusrau I in alliance with the newly emerging Turks, crushed the Hephthalites at the battle of Bukhara - after which their empire collapsed; for a time Hephthalites in lingered on in fragmented principalities - but mostly they'd fallen to Turks by around 625.
Alkhans
Evidence of coinage (bearing portraits of kings with high artificially deformed skulls) shows they replaced Sasanian rule in the Kabul valley area from around AD 400. Khingila ruled for about 50 years (c435 - 490) - under Khingila (who appears in the Shahnameh as Shengil, king of India) and his successors Hun rule was extended into Gandhara and northern India, but was probably ended by c535.
Attila: the Huns in Europe
The Huns who crossed the Volga around 370 began as a migration rather than an invasion. They overcame the Alans, some of whom joined them. See here for more about the Huns in Europe. The fear they inspired is well reflected in Ammianus' enthusiastic racism:
They have squat bodies, strong limbs, and thick necks, and are so prodigiously ugly and bent that they might be two-legged animals... still, their shape, however disagreeable, is human; but their way of life is so rough that they have no use for fire or seasoned food, but live on the roots of wild plants and the half-raw flesh of any sort of animal, which they warm a little by placing it beweeen their thighs ... [he goes on!]Ammianus Marcellinus 31.2
Attila's Huns had no structure or unity like their predecessors the Xiongnu (who built a strong and stable empire) - or their successors the Mongols (who connected China with Europe). After their brief rule of terror and extortion, threatening both halves of the Roman empire, the threat retreated. After Attila's defeat in 451 at the Catalaunian Plains (somewhere near Châlons-sur-Marne) and his unexpected and unexplained death on his wedding night in 453, his horde fell apart, to be absorbed into the condfederations of Avars, Bulgars and Khazars. By 469, the Huns had ceased to exist. Unlike the Xiongnu and the Mongols, they lefy nothing behind, except a few ruins.
Attila by Eugene Delacroix. Public domain.