As George Joseph notes in his chapter on African literature in Understanding Contemporary Africa, whereas European views of literature often stressed a separation of art and content, African awareness is inclusive:
"Literature" can also imply an artistic use of words for the sake of art alone. ...traditionally, Africans do not radically separate art from teaching. Rather than write or sing for beauty in itself, African writers, taking their cue from oral literature, use beauty to help communicate important truths and information to society. Indeed, an object is considered beautiful because of the truths it reveals and the communities it helps to build. 
Examples of pre-colonial African literature are numerous. Oral literature of west Africa includes the "Epic of Sundiata" composed in medieval Mali, and the older "Epic of Dinga" from the old Ghana Empire. In Ethiopia, there is a substantial literature written in Ge'ez going back at least to the 4th century AD; the best-known work in this tradition is the Kebra Negast, or "Book of Kings." One popular form of traditional African folktale is the "trickster" story, where a small animal uses its wits to survive encounters with larger creatures. Examples of animal tricksters include Anansi, a spider in the folklore of the Ashanti people of Ghana; Ijàpá, a tortoise in Yoruba folklore of Nigeria; and Sungura, a hare found in central and East African folklore. Other works in written form are abundant, namely in north Africa, the Sahel regions of west Africa and on the Swahili coast. From Timbuktu alone, there are an estimated 300,000 or more manuscripts tucked away in various libraries and private collections, mostly written in Arabic but some in the native languages (namely Fula and Songhai). Many were written at the famous University of Timbuktu. The material covers a wide array of topics, including Astronomy, Poetry, Law, History, Faith, Politics, and Philosophy among other subjects.Swahili literature similarly, draws inspiration from Islamic teachings but developed under indigenous circumstances. One of the most renowned and earliest pieces of Swahili literature being Utendi wa Tambuka or "The Story of Tambuka".
In Islamic times, North Africans such as ibn Khaldun attained great distinction within Arabic literature. Medieval north Africa boasted universities such as those of Fes and Cairo, with copious amounts of literature to supplement them.
In the colonial period, Africans exposed to Western languages began to write in those tongues. In 1911, Joseph Ephraim Casely Hayford (also known as Ekra-Agiman) of the Gold Coast (now Ghana) published what is probably the first African novel written in English, Ethiopia Unbound: Studies in Race Emancipation. Although the work moves between fiction and political advocacy, its publication and positive reviews in the Western press mark a watershed moment in African literature.
African literature in the late colonial period (between the end of World War I and independence) increasingly showed themes of liberation, independence, and (among Africans in French-controlled territories) négritude. One of the leaders of the négritude movement, the poet and eventual President of Senegal, Léopold Sédar Senghor, published in 1948 the first anthology of French-language poetry written by Africans, Anthologie de la nouvelle poésie nègre et malgache de langue française (Anthology of the New Black and Malagasy Poetry in the French Language), featuring a preface by the French existentialist writer Jean-Paul Sartre.
Nor was the African literary clericy of this time relatively divorced from the issues that it tackled. Many, indeed, suffered deeply and directly: censured for casting aside his artistic responsibilities in order to participate actively in warfare, Christopher Okigbo was killed in battle for Biafra against the Nigerian movement of the 1960s' civil war; Mongane Wally Serote was detained under South Africa's Terrorism Act No 83 of 1967 between 1969 and 1970, and subsequently released without ever having stood trial; in London in 1970, his countryman Arthur Norje committed suicide; Malawi's Jack Mapanje was incarcerated with neither charge nor trial because of an off-hand remark at a university pub; and, in 1995, Ken Saro-Wiwa died by the gallows of the Nigerian junta.
Postcolonial African literature
With liberation and increased literacy since most African nations gained their independence in the 1950s and 1960s, African literature has grown dramatically in quantity and in recognition, with numerous African works appearing in Western academic curricula and on "best of" lists compiled at the end of the 19th century. African writers in this period wrote both in Western languages (notably English, French, and Portuguese) and in traditional African languages such as Hausa.
Ali A. Mazrui and others mention seven conflicts as themes: the clash between Africa's past and present, between tradition and modernity, between indigenous and foreign, between individualism and community, between socialism and capitalism, between development and self-reliance and between Africanity and humanity. Other themes in this period include social problems such as corruption, the economic disparities in newly independent countries, and the rights and roles of women. Female writers are today far better represented in published African literature than they were prior to independence.
^Stephanie Newell, Literary Culture in Colonial Ghana: 'How to Play the Game of Life' , Bloomington, Indiana: Indiana University Press, 2002, p. 135, ch. 7, "Ethical Fiction: J.E. Casely Hayford's Ethiopia Unbound".