The aqir (Azj'Aqir, the name of the empire, is sometimes used as the name of the race) are an old race. The races of the nerubians and qiraji were once one people, the aqir, until the qiraji warred with the Gurubashi and Amani troll empires, and after their culture was shattered, the nerubians had to flee north.
16,000 years before the Orcish invasion of Azeroth, the world was still made up of one large continent surrounded by the Great Sea. The ancient titans had named the continent Kalimdor, “Land of Eternal Starlight", and in its middle they had long ago placed a lake of scintillating energies. The lake, which they named the Well of Eternity, was to be the fountain of life for the world.
It is in this world that the trolls ruled the eastern lands. No longer one united race, the trolls in the north had formed the empire of Zul'Aman while their counterparts in the south had built up what they called the Gurubashi Empire. These trolls, ever violent and aggressive, had managed to form a loose alliance that allowed them to defend their lands against a much larger threat that had taken control of the western parts of Kalimdor.
This threat came from a third empire — the civilization of Azj'Aqir. The aqir were intelligent insectoids who ruled the lands of the far west. These clever insectoids were greatly expansionistic and incredibly evil. The aqir were obsessed with eradicating all non-insect life from the fields of Kalimdor. The trolls fought them for many thousands of years, but never succeeded in winning a true victory over the aqir. Eventually, due to the trolls' persistence, the aqiri kingdom split in half as its citizens fled to separate colonies in the far northern and southern regions of the continent. Two aqiri city-states emerged: Azjol-Nerub in the northern wastes, and Ahn'Qiraj in the southern desert. Although the trolls suspected that there were other aqiri colonies beneath Kalimdor, their existence was never verified.
Possibly due to the environment, the two groups eventually became completely different beings, though whether this was a divide that had always existed remains unknown. The spider-like nerubians populate the northern city of Azjol-Nerub, while the more insectoid qiraji have taken up residence in Ahn'Qiraj.