The etymological view supported by numerous noted scholars is that the name Afghan (अफ़गान) evidently derives from Sanskrit Ashvaka (अश्वक) or Ashvakan (अश्वकन), the Assakenois of Arrian (इरान / आर्यन). This view was propounded by scholars like Dr. Christian Lassen, J. W. McCrindle, etc. and has been supported by numerous modern scholars   . In Sanskrit, word ashva (Iranian aspa, Prakrit assa) means "horse", and ashvaka (Prakrit assaka) means "horseman". Pre-Christian times knew the people of eastern Afghanistan as Ashvakas (horsemen) since they raised a fine breed of horses and had a reputation for providing expert cavalrymen.
The fifth-century-BCE Indian grammarian Panini calls them Ashvakayana (अश्वकन्या) and Ashvayana (अश्वान्या) respectively. Classical writers use the respective equivalents Aspasios (or Aspasii, Hippasii) and Assakenois (or Assaceni/Assacani, Asscenus), etc. The Aspasios/Assakenois (Ashvakas = Cavalrymen) is stated to be another name for the Kambojas (काम्बोज) of Ancient texts because of their equestrian characteristics. In ancient Pali texts, the Kamboja land is described as the land of horses. The relics of the name Assakenoi are still seen in the Aspin of Chitral and the Yashkun of Gilgit, according to Dr. J. W. McCrindle.
The confederation of the Kambojas may have stretched from the valley of Rajauri in the south-western part of Kashmir to the Hindu Kush Range; in the south–west the borders extended probably as far as the regions of Kabul, Ghazni and Kandahar, with the nucleus in the area north-east of the present-day Kabul, between the Hindu Kush Range and the Kunar river, including Kapisa possibly extending from the Kabul valleys to Kandahar.
There is also another etymological view that Kabul is also derived from Kamboja. Kamboja => Kaabula (काम्बोज => काबुल).
In this regard, the Encyclopædia Iranica states: “From a more limited, ethnological point of view, "Afghan" is the term by which the Persian-speakers of Afghanistan (and the non-Pašto-speaking ethnic groups generally) designate the Paštun. The equation [of] Afghan [and] Paštun has been propagated all the more, both in and beyond Afghanistan, because the Paštun tribal confederation is by far the most important in the country, numerically and politically.”
It further explains: “ The term "Afghan" has probably designated the Paštun since ancient times. Under the form Avagana, this ethnic group is first mentioned by the Indian astronomer Varaha Mihira in the beginning of the 6th century A.D. in his Brahat-samahita (बृहत् संहिता). ”
This information is supported by traditional Pashto literature, for example in the writings of the 17th century Pashto poet Khushal Khan Khattak:
“ Pull out your sword and slay any one, that says Pashton and Afghan are not one! Arabs know this and so do Romans: Afghans are Pashtons, Pashtons are Afghans! ”
The last part of the name "-stan" is an Indo-Iranian suffix for "place", prominent in many languages of the region. The term "Afghanistan" (अफ़गानिस्तान), meaning the "Land of Afghans" (अफ़गान का स्थान), was mentioned by the 16th century Mughal Emperor Babur in his memoirs, referring to the territories south of Kabul that were inhabited by Pashtuns (called "Afghans" by Babur).