Here is an excerpt from Christopher Petersen at Through a Glass Darkly on this subject:
Not too long ago during some significant downtime for the platoon I indulged in a Rambo movie marathon which of course included Rambo III whose events in the movie occur during the latter end of the Soviet invasion of Afghanistan. It is easily the worst in the franchise (Rambo II remains my favorite even with its over the top, cartoonesque action sequences) for a number of cinematic reasons, but my principal problem with the film has to do with its simplistic portrayal of the Afghan people. Stallone's film falters for me because it engages in a gross romanticisation of the Afghans (the movie is in fact dedicated to them) by presenting them as a monolithic group of people who desire nothing more than to be left alone and to be free; honorable warriors who can do no wrong and who've never been defeated in war. It's this last emphasis on Afghan invincibility that I find particularly irksome and problematic historically.And there's plenty more where that came from.
However, this isn't a myth that's sui generis to Rambo III; rather it's a widespread belief held by the public and policy makers alike that has persisted since at least the 1980s and has been neatly packaged in such references to Afghanistan in popular thought as "the graveyard of empires". The narrative of the myth goes something like this: Alexander the Great had great difficulty in conquering this region as did the Muslims and Mongols; the British were defeated several times by the Afghans; the Soviets with its huge technological advantage were beaten by the Afghans by nothing more than WWI enfield rifles; and the United States is now finding that it too cannot conquer this country or its people. Now just to be clear I in no way wish to disparage the unique fighting ability of these people for they have indeed proven themselves on the battlefield repeatedly. Nevertheless, this notion that they have never been conquered or defeated is a myth and one that needs demolishing.
Unfortunately, there is a difficulty in attempting to survey a military history of Afghanistan because of the problem in pinpointing precisely when one can properly speak of a group of people called Afghans (even today this is problematic because you have a cluster of ethnic groups living in Afghanistan such as Pashtoons, Tajiks, Nuristanis, Uzbeks, et al.) because of its history of heavily mixed ethnic groups, tribal affiliations, and fluctuating borders. In addition, what we think of today as the political entity of Afghanistan didn't come into existence until the mid 19th century and even then its borders were essentially determined by British and Russian interests during their "Great Game" in Central Asia and not according to what would have been best demographically and/or geographically.
But for simplicity's sake let us assume that the Afghan people are those who have generally occupied the region that today encompasses the borders of modern Afghanistan since time immemorial. Given this condition an accurate military history of this region would run as follows:
1.) From what historians and archaeologists have been able to determine the region of modern day Afghanistan first came under subjugation during the conquests of Darius I and the Persian Empire circa 500 BCE.
2.) Alexander the Great defeated the Persian empire and subsequently, though with some difficulty, conquered this vast region c. 330 BCE. Upon his death the Macedonian empire split among several rulers, and Seleucus, a former Macedonian officer under Alexander, took it upon himself to govern the region that encompasses modern day Iran and Afghanistan.
3.) The Mauryan Empire (an ancient Indian empire) under Chandragupta defeated the remnants of Seleucus' dynasty and conquered most of Afghanistan in roughly 200 BCE.
4.) Sometime in the late 1st century BCE the Scythians, a Steppe peoples, migrated into Afghanistan and subdued the various tribal groups there.
5.) The Parthians, as part of their war with the remnants of the Seleucid dynasty, invaded and conquered Afghanistan (and India) and effectively maintained control of the region well into Late Antiquity. (Technically, it was the Indo-Parthians who ruled during this period, but historians consider them to be at least nominally a part of the larger Parthian empire.)