Also known as "Èkó" in popular contexts, Lagos has been Nigeria's premier city since at least 1861. Its role as entrêpot (distribution center) to the West African coast assured by geography, Lagos attracted Portuguese traders and had become a major center for the slave trade by early seventeenth century. From 1851, the British bombarded the city, seeking to expel Portuguese slave dealers, abolish the slave trade altogether, and establish legitimate trade in its place. In the process, the British set up their own colonial administration and finally annexed the city in 1861. The former city-state would soon become a bridgehead to the conquest of the territories that became Nigeria. In 1914, Lagos was named Nigeria's political capital, retaining that status until 1991 when Abuja formally became Nigeria's new federal capital territory. It has since remained Nigeria's capital, except in name.

Lagos is Nigeria's most cosmopolitan city; it is probably also the most over-populated. At the first census in 1871, the city was home to just over 28,000 people; by 1952, the population stood at over 252,000. In the 1970s, estimates ranged widely from near 600,000 to 1,500,000. These figures are not necessarily accurate, but they do suggest that Lagos is a city of immigrants. From early settlers through slave raiders to colonial officials, the city and its mainland towns had always been a place to move to in search of improved life chances, political power, better living standards, and exposure to the economic opportunities offered by the larger world. One of the city's aliases, "Èkó ilé ogbón," reflects these themes. It translates literally to "Ékó fountain of common sense," but the metaphorical point is that doom awaits the visitor to the city who is not streetwise or the new migrant slow to adjust to urban and competitive lifestyles in greater Lagos.