Pygmies probably once lived in the continental region that is now Equatorial Guinea, but are today found only in isolated pockets in southern Río Muni.
Bantu migrations started probably around 4,000 BP from between south-east Nigeria and north-west Cameroon (the Grassfields). They must have settled continental Equatorial Guinea around 2,500 BP at the latest . The earliest settlements on Bioko Island are dated to 1480 BP. The Annobón population, originally native to Angola, was introduced by the Portuguese via São Tomé island.
First European contact (1472)
The Portuguese explorer Fernando Pó, seeking a path to India, is credited as being the first European to discover the island of Bioko in 1472. He called it Formosa ("Beautiful"), but it quickly took on the name of its European discoverer. Fernando Pó and Annobón were colonized by Portugal in 1474.
In 1778, Queen Maria I of Portugal and King Charles III of Spain signed the Treaty of El Pardo which ceded Bioko, adjacent islets, and commercial rights to the Bight of Biafra between the Niger and Ogoue rivers to Spain. Spain thereby tried to gain access to a source of slaves controlled by British merchants. Between 1778 and 1810, the territory of Equatorial Guinea was administered by the Viceroyalty of the Río de la Plata, based in Buenos Aires.
From 1827 to 1843, the United Kingdom had a base on Bioko to control the slave trade, which was moved to Sierra Leone under an agreement with Spain in 1843. In 1844, on restoration of Spanish sovereignty, the area became known as the "Territorios Españoles del Golfo de Guinea." Spain had neglected to occupy the large area in the Bight of Biafra to which it had right by treaty, and the French had busily expanded their occupation at the expense of the area claimed by Spain. The treaty of Paris in 1900 left Spain with the continental enclave of Rio Muni, a mere 26,000 km2 out of the 300,000 stretching east to the Ubangi river which the Spaniards had initially claimed.
The plantations of Fernando Pó were mostly run by a black Creole elite, later known as Fernandinos. The British occupied the island briefly in the early 19th century, settling some 2,000 Sierra Leoneans and freed slaves there. Limited immigration from West Africa and the West Indies continued after the British left. To this were added Cubans, Filipinos and Spaniards of various colours deported for political or other crimes, as well as some assisted settlers.
There was also a trickle of immigration from the neighbouring Portuguese islands, escaped slaves and prospective planters. Although a few of the Fernandinos were Catholic and Spanish-speaking, about nine-tenths of them were Protestant and English-speaking on the eve of the First World War, and pidgin English was the lingua franca of the island. The Sierra Leoneans were particularly well placed as planters while labor recruitment on the
Windward coast continued, for they kept family and other connections there and could easily arrange a supply of labor.
The opening years of the twentieth century saw a new generation of Spanish immigrants. Land regulations issued in 1904–1905 favoured Spaniards, and most of the later big planters arrived from Spain after that. The Liberian labor agreement of 1914
favoured wealthy men with ready access to the state, and the shift in labor supplies from Liberia to Rio Muni increased this advantage. In 1940, an estimated 20% of the colony's cocoa production came from African-owned land, nearly all of it was in the hands of Fernandinos.
The greatest constraint to economic development was a chronic shortage of labour. Pushed into the interior of the island and decimated by alcohol addiction, venereal disease, smallpox, and sleeping sickness, the indigenous Bubi population of Bioko refused to work on plantations. Working their own small cocoa farms gave them a considerable degree of autonomy.
By the late nineteenth century, the Bubi were protected from the demands of the planters by Spanish Claretian missionaries, who were very influential in the colony and eventually organised the Bubi into little mission theocracies reminiscent of the famous Jesuit reductions in Paraguay. Catholic penetration was furthered by two small insurrections in 1898 and 1910 protesting conscription of forced labour for the plantations. The Bubi were disarmed in 1917, and left dependent on the missionaries.
Between 1926 and 1959 Bioko and Rio Muni were united as the colony of Spanish Guinea. The economy was based on large cacao and coffee plantations and logging concessions and the workforce was mostly immigrant contract labour from Liberia, Nigeria, and Cameroun. Between 1914 and 1930, an estimated 10,000 Liberians went to Fernando Po under a labour treaty that was stopped altogether in 1930.
With Liberian workers no longer available, planters of Fernando Po turned to Rio Muni. Campaigns were mounted to subdue the Fang people in the 1920s, at the time that Liberia was beginning to cut back on recruitment. There were garrisons of the colonial guard throughout the enclave by 1926, and the whole colony was considered 'pacified' by 1929.
Rio Muni had a small population, officially a little over 100,000 in the 1930s, and escape across the frontiers into Cameroun or Gabon was very easy. Also, the timber companies needed increasing numbers of workers, and the spread of coffee cultivation offered an alternative means of paying taxes . Fernando Pó thus continued to suffer from labour shortages. The French only briefly permitted recruitment in Cameroun, and the main source of labour came to be Igbo smuggled in canoes from Calabar in Nigeria. This resolution to the worker shortage allowed Fernando Pó to become one of Africa's most productive agricultural areas after the Second World War.
Politically, post-war colonial history has three fairly distinct phases: up to 1959, when its status was raised from 'colonial' to 'provincial', following the approach of the Portuguese Empire; between 1960 and 1968, when Madrid attempted a partial decolonisation aimed at keeping the territory as part of
the Spanish system; and from 1968 on, after the territory became an independent republic. The first phase consisted of little more than a continuation of previous policies; these closely resembled the policies of Portugal and France, notably in dividing the population into a vast majority governed as 'natives' or non-citizens, and a very small minority (together with whites) admitted to civic status as emancipados, assimilation to the metropolitan culture being the only permissible means of advancement.
This 'provincial' phase saw the beginnings of nationalism, but chiefly among small groups who had taken refuge from the Caudillo's paternal hand in Cameroun and Gabon. They formed two bodies: the Movimiento Nacional de Liberación de la Guinea (MONALIGE), and the Idea Popular de Guinea Ecuatorial (IPGE). The pressure they could bring to bear was weak, but the general trend in West Africa was not.
A decision of 9 August 1963, approved by a referendum of 15 December 1963, gave the territory a measure of autonomy and the administrative promotion of a 'moderate' group, the
Movimiento de Unión Nacional de la Guinea Ecuatorial
(MUNGE). This proved a feeble instrument, and, with growing pressure for change from the UN, Madrid gave way to the currents of nationalism.
Independence was conceded on 12 October 1968 and the region became the Republic of Equatorial Guinea. Francisco Macías Nguema was elected president.
On Christmas Eve 1969, Macías Nguema had 150 alleged coup plotters executed. 
In July 1970, Macias Nguema created a single-party state and made himself president for life in 1972. He broke off ties with Spain and the West. In spite of his condemnation of Marxism, which he deemed "neo-colonialist", Equatorial Guinea maintained very special relations with socialist countries, notably China, Cuba, and the USSR. He signed a preferential trade agreement and a shipping treaty with the Soviet Union. The Soviets also made loans to Equatorial Guinea.
The shipping agreement gave the Soviets permission for a pilot fishery development project and also a naval base at Luba. In return the USSR was to supply fish to Equatorial Guinea. China and Cuba also gave different forms of financial, military, and technical assistance to Equatorial Guinea, which got them a measure of influence there. For the USSR, there was an advantage to be gained in the War in Angola from access to Luba base and later on to Malabo International Airport.
In 1974 the World Council of Churches affirmed that large numbers of people had been murdered since 1968 in an ongoing reign of terror. A quarter of the entire population had fled abroad, they said, while 'the prisons are overflowing and to all intents and purposes form one vast concentration camp'. Out of a population of 300,000, an estimated 80,000 were killed. Apart from allegedly committing genocide against the ethnic minority Bubi people, he ordered the deaths of thousands of suspected opponents, closed down churches and presided over the economy's collapse as skilled citizens and foreigners fled the country.
The nephew of Macías Nguema, Teodoro Obiang deposed his uncle on 3 August 1979, in a bloody coup d'état; over two weeks of civil war ensued until Nguema was captured. He was tried and executed soon afterward.
In 1995 Mobil, an American oil company, discovered oil in Equatorial Guinea. The country subsequently experienced rapid economic development, but earnings from the country's oil wealth have not reached the population and the country ranks low on the UN human development index. Some 20% of children die before age 5 and more than 50% of the population lacks access to clean drinking water. President Teodoro Obiang is widely suspected of using the country's oil wealth to enrich himself and his associates. In 2006, Forbes estimated his personal wealth at $600 million.
In 2011, the government announced it was planning a new capital for the country, named Oyala. It was renamed to Ciudad de la Paz ("City of Peace") in 2017.
As of February 2016
, Obiang is Africa's longest serving dictator.