The first known use of the word freedom in a political context dates back to the 24th century BC, in a text describing the restoration of social and economic liberty in Lagash, a Sumerian city-state. Urukagina, the king of Lagash, established the first known legal code to protect citizens from the rich and powerful. Known as a great reformer, Urukagina established laws that forbade compelling the sale of property and required the charges against the accused to be stated before any man accused of a crime could be punished. This is the first known example of any form of due process in the history of humanity.
Like Urukagina, most ancient freedoms focused on negative liberty, protecting the less fortunate from harassment or imposition. Other ancient legal codes, such as the Code of Hammurabi, similarly forbade compulsion in economic matters, like the sale of land, and made it clear that when a rich man murders a poor one, it is still murder. Still, these codes relied on a certain virtuousness of kings and ministers, which was far from reliable.
In the Persian Empire, citizens of all religions and ethnic groups were given the same rights and had the same freedom of religion, women had the same rights as men, and slavery was abolished. All the palaces of the kings of Persia were built by paid workers in an era where slaves typically did such work.
In the Maurya Empire of anciet India, citizens of all religions and ethnic groups had rights to freedom, tolerance, and equality. The need for tolerance on an egalitarian basis can be found in the Edicts of Ashoka the Great, which emphasize the importance of tolerance in public policy by the government. The slaughter or capture of prisioners of war was also condemned by Ashoka. Slavery was also non-existent in ancient India.
Roman law also embraced certain limited forms of liberty, even under the rule of the Roman Emperors. However, these liberties were accorded only to Roman citizens. Still, the Roman citizen enjoyed a combination of positive liberty (the right to freely enter contracts, the right to a legal marriage) and negative liberty (the right to a trial, a right to appeal and the right to not be tortured). Many of the liberties enjoyed under Roman law endured through the Middle Ages, but were enjoyed solely by the nobility, never by the common man. The idea of unalienable and universal liberties had to wait until the Age of Enlightenment.
In Chinese, freedom is written (ziyou). Zi is the character for self, and You means follow, with an additional connotation of reason. Liberty thus implies a necessary connection between individualism and a rational duty.