Little is known of the early history of Senegal. By the Middle Ages, such groups as the Wolof, Serer, and Toucouleur had entered the area from the north. In about the 11th century, North African traders brought the Islamic religion to the region. For many centuries, parts of Senegal were included in various African kingdoms.

European exploration of Senegalese lands was begun in the 15th century by the Portuguese. In the 17th century the French established trading settlements at the mouth of the Senegal River and on Gorée Island (off Dakar). During the 18th century France and Great Britain vied for control of the region around the Senegal and Gambia rivers known as Senegambia. French possession was confirmed by the Congress of Vienna in 1815. In the mid-19th century, the French extended their control to the interior of the region. In 1895 the colony of Senegal was officially established with its present borders and was made headquarters for the government of French West Africa.

Senegal became a republic within the French Community in 1958. In 1959 it joined the Sudanese Republic in forming the Federation of Mali. When the federation gained independence in 1960, Senegal withdrew and became an independent republic. Lésopold S. Senghor, a leading African nationalist, was elected president. He was repeatedly reelected. Famine, resulting from persistent drought, marked the 1970's. At the end of 1980, Senghor resigned from the presidency and retired. In 1981 Senegal helped the president of Gambia put down a coup. The following year Senegal and Gambia united in a loose confederation called Senegambia; the confederation was dissolved in 1989.

In the early 1980's a separatist political movement arose in the southern province of Casamance. By the early 1990's the movement had grown into a guerrilla insurgency, which was engaged in intense fighting at the end of the decade. In 2004, the rebel group signed a peace agreement with the Senegal government.

Senegal adopted a new constitution in January, 2001.