The history of Nigeria can be traced to the earliest inhabitants from at least 9000 BC through to early civilizations such as the Nok culture which began around 1500 BC. Numerous ancient African civilizations settled in the region that is known today as Nigeria, such as the Ife Empire, Kingdom of Nri, the Benin Kingdom, and the Oyo Empire. Islam reached Nigeria through the Bornu Empire between (1068 AD) and Hausa Kingdom during the 11th century, while Christianity came to Nigeria in the 15th century through Augustinian and Capuchin monks from Portugal to the Kingdom of Warri.Ryder, A. F. C. "MISSIONARY ACTIVITY IN THE KINGDOM OF WARRI TO THE EARLY NINETEENTH CENTURY". Journal of the Historical Society of Nigeria, vol. 2, no. 1, 1960, pp. 1–26. . Accessed 4 July 2023. The Songhai Empire also occupied part of the region. Through contact with Europeans, early harbour towns such as Calabar, Badagry, and Bonny emerged along the coast after 1480, which did business in the transatlantic slave trade, among other things.

After 1804, Usman dan Fodio unified an immense territory in his jihad against the superior but quarrelling Hausa states of the north, which was stabilised by his successors as the "Caliphate of Sokoto".

In its initial endeavour to stop the slave trade in West Africa, the United Kingdom gradually expanded its sphere of influence after 1851, starting from the tiny island of Lagos (3 km2) and the port city of Calabar. The British followed expansive trading companies such as the RNC and missionaries such as Mary Slessor, who advanced into the hinterland, preached and founded missionary schools, but also took action against local customs such as the religiously induced killing of twins or servants of deceased village elders and against the Trial by ordeal as a means of establishing the legal truth. At the Berlin Congo Conference in 1885, the European powers demarcated their spheres of interest in Africa without regard to ethnic or linguistic boundaries and without giving those affected a say. Thereafter, the British made increasing advances in the Niger region, which they had negotiated in Berlin, and ultimately defeated the Sokoto Caliphate. From 1903, Great Britain controlled almost the entire present-day territory of Nigeria, which was united under a single administration in 1914 (in 1919, a border strip of the former German colony of Cameroon was added to the territory of Nigeria).

Under the British colonial administration, purchasing cartels (of companies such as Unilever, Nestlé and Cadbury) kept the prices of cocoa, palm oil and peanuts artificially low, thereby damaging Nigerian agriculture, but on the other hand ports and an extensive railway network were also built. Newspapers, political parties, trade unions and higher education institutions were established - rather against the wishes of the colonial rulers in order to control the oversized colony. In the East African campaign of 1941, Nigerian regiments achieved the first major success against the Axis powers with the fastest military advance in history at the time. In 1956, oil fields were discovered in Nigeria. Since then, vandalism, oil theft and illegal, unprofessional refining by local residents have caused the contamination of the Niger Delta with crude and heavy oil, particularly around disused exploratory boreholes.

Nigeria gained independence in 1960. From 1967 to 1970, the Biafran War raged in the southeast, becoming one of the worst humanitarian disasters of the late twentieth century. After nearly three decades of largely restrictive military rule, Nigeria transitioned to a democratic federal republic in 1999, modeled in part on the political system of the United States.

Quadrennial elections have been criticized as lacking transparency. Nevertheless, transfers of presidential power at Aso Rock occurred peacefully in 2007, 2010, 2015, and 2023, making Nigeria one of the relatively stable democracies in the region despite persistent institutional challenges.

The Boko Haram insurgency gained significant international attention around 2014 but later weakened due to internal divisions and coordinated regional military efforts. In the same year, the spread of the Ebola epidemic to the densely populated city of Lagos was successfully contained through rapid public health response and crisis management.

In recent years, Nigeria has experienced growing international recognition for its cultural and technological sectors, including the global rise of Nigerian music and the expansion of the film industry. The country has also seen growth in the technology sector, producing five of Africa's seven technology unicorn companies.

Since January 2024, Nigeria has sought to expand domestic refining capacity, including the commissioning of large new refineries, in an effort to process more of its own crude oil rather than relying heavily on imported refined products.

Kidnapping for ransom remains one of Nigeria's most significant security challenges. Surveys indicate that approximately 38% of Nigerians personally know someone who has been kidnapped.

Economic reforms implemented in 2023 were followed by a sharp rise in the cost of living; polls suggest that about 64% of Nigerians report being unable to afford basic needs or experiencing food insecurity. The same survey reported that 78% of respondents rated the performance of President Bola Tinubu as “poor” or “very poor”.

Prehistory

Acheulean tool-using archaic humans may have dwelled throughout West Africa since at least between 780,000 BP and 126,000 BP (Middle Pleistocene).

By at least 61,000 BP, Middle Stone Age West Africans may have begun to migrate south of the West Sudanian savanna, and, by at least 25,000 BP, may have begun to dwell near the coast of West Africa.

An excessively dry Ogolian period occurred, spanning from 20,000 BP to 12,000 BP. By 15,000 BP, the number of settlements made by Middle Stone Age West Africans decreased as there was an increase in humid conditions, expansion of the West African forest, and increase in the number of settlements made by Late Stone Age West African hunter-gatherers. Iwo Eleru people persisted at Iwo Eleru, in Nigeria, as late as 13,000 BP.

Macrolith-using late Middle Stone Age peoples, who dwelled in Central Africa, to western Central Africa, to West Africa, were displaced by microlith-using Late Stone Age Africans as they migrated from Central Africa into West Africa. After having persisted as late as 1000 BP, or some period of time after 1500 AD, remaining West African hunter-gatherers were ultimately acculturated and admixed into the larger groups of West African agriculturalists.

The Dufuna canoe, a dugout canoe found in Yobe State in northeastern Nigeria has been dated to around 6300 BC, making it the oldest known boat in Africa, and the second oldest worldwide.

Iron Age

Archaeological sites containing iron smelting furnaces and slag have been excavated at sites in the Nsukka region of southeast Nigeria in what is now Igboland: dating to 2000 BC at the site of Lejja (Eze-Uzomaka 2009) and to 750 BC and at the site of Opi (Holl 2009). Iron metallurgy may have been independently developed in the Nok culture between the 9th century BC and 550 BC. More recently, Bandama and Babalola (2023) have indicated that iron metallurgical development occurred 2631 BC – 2458 BC at Lejja, in Nigeria.

Daima, an archaeological tell site located near Lake Chad in Borno State, has a history of human occupation spanning approximately 1800 years, from 550 BC to 1150 AD. The sequence of occupation is divided into three phases: Daima I (800 BC—500 AD) represents an occupation of a people without metalwork; Daima II (500 BC—800 AD) represents the earliest iron-using people of the site; and Daima III (800 BC—1100/1300 AD) a more "advanced" iron-using people.

Nok culture

Nok culture may have emerged in 1500 BC and continued to persist until 1 BC. Nok people developed terracotta sculptures through large-scale economic production, as part of a complex funerary culture. Iron metallurgy may have been independently developed in the Nok culture between the 9th century BC and 550 BC. As each share cultural and artistic similarity with the Nok culture, the Niger-Congo-speaking Yoruba, Jukun, or Dakakari peoples may be descendants of the Nok peoples. Based on stylistic similarities with the Nok terracottas, the bronze figurines of the Yoruba Ife Empire and the Bini kingdom of Benin may also be continuations of the traditions of the earlier Nok culture.

Igbo-Ukwu Archaeology at the site of Igbo-Ukwu has revealed an advanced level of expertise in the area of bronze sculpture. Smiths from around the 9th century used techniques such as lost wax casting that were not found elsewhere in the region at the time. Their works are thought to be the earliest examples of copper alloy in sub-Saharan Africa. Beads used in the art are believed to have come from as far as Egypt, suggesting a strong presence of cross-Africa trade.

Early states before 1500

Advance of Islam in the north, the 14 Hausa states

With the spread of Islam from the 7th century AD, the area became known as Sudan or Bilad Al Sudan (“Land of the Blacks”, Arabic: بلاد السودان). Around the eighth century, Arab documents mention that Muslims crossed the Sahara to West Africa for trade purposes. Several factors contributed to the growth of the Muslim class in non-Muslim kingdoms. Islam facilitated long-distance trade by providing merchants with useful tools such as contract law, credit (e.g. mudaraba) and information networks. Muslim merchants also played an important role as advisors and scribes. They had the ability to use letter-based writing (instead of hieroglyphics), which was helpful in the administration of kingdoms. Arithmetic in a decimal system (Arabic numerals) was also introduced to West Africa through Islam.

A system of Hausa city-states had existed in northern Nigeria since the 11th century. These city-states were mainly subject to tribute to large empires such as Kanem on Lake Chad. In the 14th century, all the ruling elites of Hausaland were Muslims.

From 1400 onwards, Nigeria's first written documents with letters were produced in the north of the country. They were part of the Islamic missionary work and were written in Ajami - a script based on Arabic, but supplemented by special letters for local languages (Hausa, Fula, Yoruba). The Hausa also began to write history. In the Kano Chronicle, the history of the Hausa state is traced back to 999 AD.

Northern kingdoms of the Sahel

After the collapse of Mali, a local leader named Sonni Ali (1464–1492) founded the Songhai Empire in the Middle Niger region and took control of the trans-Saharan trade. Sonni Ali conquered Timbuktu in 1468 and Djenné in 1473 and built his regime on trade revenues and cooperation with Muslim merchants. His successor Askia Muhammad Ture (1493–1528) made Islam the official religion, built mosques and brought Muslim scholars to Gao, including al-Maghili (d. 1504).Ira M. Lapidus, A History of Islamic Societies, Cambridge, 1988.

Throughout the 16th century, much of northern Nigeria paid homage to the Songhai Empire in the west or the rival Borno Empire in the east.

Kanem–Bornu Empire

Kanem became an empire in the Lake Chad Basin in the 13th century. The Mai (king) of Kanem and his court adopted Islam in the 11th century. The first ruler of Kanem was Saif and his dynasty, the Sayfawa, ruled the empire for a millennium (800 AD to 1846 AD). The first Muslim ruler of Kanem was Mai Umme Jilmi (r. 1085–1097), who died on his way to Mecca in Egypt. Due to the growing influence of Kanem in North Africa and the territorial expansion it achieved in the 12th and 13th centuries, the empire became very well known in the Islamic world of the time.