After World War II, though the Attlee-led British government decided to give freedom to India, they held on to much of Africa. But why did this attempt at colonization fail? Wikipedia explains that the economy of Africa did not improve. But what were the reasons behind this? As in any history of colonization, I expect resistance of the local people to be an important reason. But Africa had, at the time of British rule, a very small middle class and thus few political leaders. So why did the British (and other European powers) fail to continue their rule?
There are several reasons for the decolonisation of Africa in the post WW2 world - some of them indicate a decision to withdraw rather than a failure to continue. These reasons are in no particular order and are what I consider to be major contributing factors - for example it's also likely that desire for social reform within the UK itself was another factor as things like the National Health Service are not cheap to create or maintain.
This map depicts British territories in Africa and the year in which they were granted independence.
As mentioned by Jwenting, the damaged British economy was one of the major reasons for decolonisation.
At the end of WW2 Great Britain was essentially bankrupt having expended a great deal of money fighting WW2 and then being needing to spend yet more money rebuilding and repairing. Equally, Great Britain’s manufacturing capability had be massively re-geared to cope with fighting the war and so when the lend lease scheme ended a large economic gulf was left (BBC News). Great Britain narrowly avoided insolvency in 1946 when a loan of $4.33 Billion from the USA & Canada - Approx. $53 Billion in 2012 money. (The Twentieth Century, The Oxford History of the British Empire Volume IV, Brown. J. 1998)
This forced GB to adopt a policy of peaceful disengagement from the empire, handing control to non-communist governments when one was available. This meant that the UK was kept from the kind of costly actions fought by France and Portugal to keep control of their empires. (The Dynamics of Global Dominance, European Overseas Empires 1415–1980. Abernethy, D.)
The Suez Crisis
The impact of the Suez Crisis is largely down to economics and American Foreign Policy (Again mentioned below).
In July 1956 Egypt nationalised the Suez Canal, a vital link for world shipping. Prime Minister Anthony Eden and the government of France engineered a situation whereby Israel attack Egypt in response. This then allowed the UK and France to intervene and take control of the Suez Canal. (The Rise and Fall of the British Empire. Lawrence, J).
However, this move was not backed with the support of the United States, and prompted President Eisenhower to threaten to sell US reserve of the Pound Sterling. (Empire. Ferguson, N.) This would have caused economic ruin for the UK and forced the UK to withdraw from what was otherwise a militarily successful operation.
This forced withdrawal showed that the UK could no-longer act without approval of the United States, and following the resignation of Prime Minister Eden caused his successor, Harold Macmillian to accelerate decolonisation in order to help win back favour from the United States. (The Oxford History of the British Empire, Vol. 4: The Twentieth Century, Brown J. M, Lewis W. R.) The fact that the UK still enjoys a “special relationship” with the US where as France’s relationship with the US was severely diminished following the crises backs this up so some degree. The Suez Crisis also marks a turning point in British foreign policy with Great Britain moving away from being a great colonial power.
In August 1941 Prime Minister Winston Churchill and President Franklin D. Roosevelt issued a statement setting out the Allies aims concerning the war, and the post-war world. While this was only a statement, and there was not a signed copy, agreement to the terms of the charter was telegraphed by the British War Office to the United States and vice versa.
Further more, the governments of Belgium, Czechoslovakia, Greece, Luxembourg, the Netherlands, Norway, Poland, the Soviet Union, Yugoslavia, Free French Forces agreed to abide by the terms of the charter at a meeting of the Inter-Allied Council on the 24th Sept 1941.(Source)
While the entire text of the charter can be read by clicking the above link, part 3 is most relevant to decolonisation
This part of the charter specified commitment to self-determination, although Churchill maintained that this only applied to Axis occupied territories, which gave a great deal of hope to independence movements within the British Empire. In fact, it prompted Mohandas Karamchand Gandhi to write the following to Roosevelt
It is not unreasonable that revolutionary parties in Britain's African colonies came to the same conclusion as Gandhi with regards to how the Atlantic Charter should be applied.
Ultimately, Britain's withdrawal from it's empire was forced, but largely free of conflict within Africa (although, there were exceptions). Personally, I think the reasons for the French decolonisation of Africa needs another question.
With respect to Britain, there was an understanding between Churchill and Roosevelt that the UK would free it's colonies after the war. Atlantic Charter Specific terms described in this article are 'A key American aim was to force a change of British policy in regard to its Empire. America realized the precarious position of Britain, reliant as she was on US military aid, and intended to exploit this by forcing a commitment to self-determination, and an open door policy on resources.'.
France still had colonies in Africa after WW II. Many of the French colonies were granted self-determination in the 1950s and 1960s. Some of these were the result of bloody insurgencies, particularly in Algeria.
WW II exposed the true cost of defending far flung possessions. Britain, with a population of 40 million, was responsible for defending the quarter of the Earth's surface that it 'possessed' going into WW II. Most of Europe had lost interest in military adventures following the carnage of WW I. Once it was clear further military investment would be essential, European countries ended most claims of sovereignty outside their historical borders. Exceptions tend to be islands that continue to rely on defense and civil administration from a much larger host.