Ghiscari legions were the traditional military units of the Ghiscari Empire. Trained to fight with spear, sword and shield, they were the backbone of the Empire's domination over the continent of Essos.
Regardless of their discipline and obedience the legions were no match for the dragons of the nascent Valyrian Freehold. The expanding Valyrians clashed with the Ghiscari legions in a series of five great wars, but in the end the legions were burned and defeated. At the end of the last war, five thousand years ago, the Valyrians utterly defeated the Ghiscari: the capital city of Old Ghis was burned to ashes, and its fields were sowed with salt so that nothing would grow again. The Valyrians conquered the outlying Ghiscari colony-cities of Slaver's Bay and ruled them for the next five millennia.
Even after the Doom of Valyria, four hundred years before the War of the Five Kings, and the resulting nigh-extinction of dragons throughout east and central Essos, the age of foot soldiers was still considered dead in the face of the emergence of Dothraki khalasars. Infantry were no match against the lightning strikes of Dothraki light cavalry armed with their arakhs and bows.
The slave-masters of newly independent Slaver's Bay, however, attempted to recreate the power of the ancient Ghiscari legions in the Unsullied, warrior-eunuchs subjected to brutal training since childhood. The Unsullied slave-soldiers managed to repulse an entire Dothraki horde at the decisive Battle of Qohor, reasserting the value of lockstep infantry formations on the battlefield.
In the books
In the A Song of Ice and Fire novels, the Ghiscari legions were composed not of slaves (which the empire had in abundance) but of free citizens.
Not only the Unsullied continue the tradition of the Ghiscari legions. The city of New Ghis, whose rulers seek to rebuild the Ghicari Empire under their leadership, has formed legions armed and organized in the same manner as the Unsullied, but like the ancient legions, they are free citizens that serve in terms of three years. Only the Unsullied, however, are said to truly match the legendary quality and utter discipline of the ancient legions of Old Ghis.
The description of the Ghiscari legions is similar to the phalanxes of the ancient Mediterranean.