Little is known about ancient relations between China and the African continent, though there is some evidence of early trade connections. Highlights of medieval contacts were the 14th century journey of Ibn Battuta, the Moroccan scholar and traveler, to parts of China; the visit of Sa'id of Mogadishu, the Somali scholar and explorer to China; and the Ming Dynasty voyages of Chinese admiral Zheng He and his fleet, which rounded the coast of Somalia and followed the coast down to the Mozambique Channel. 
Modern political and economic relations commenced in the era of Mao Zedong, the first leader of the Chinese Communist Party, following the Chinese Civil War. Starting in the 21st century, the modern state of the People's Republic of China (commonly known as "China") has built increasingly strong economic ties with Africa. There are an estimated one million Chinese citizens residing in Africa. By comparison, it has been estimated that 200,000 Africans are working in China.:99 As of 2017, Burkina Faso and Swaziland are the only remaining African countries to have relations with the Republic of China (commonly known as "Taiwan").
Trade between China (PRC) and Africa increased by 700% during the 1990s, and China is currently Africa's largest trading partner. The Forum on China-Africa Cooperation (FOCAC) was established in October 2000 as an official forum to strengthen the relationship. A few Western countries, such as the United Kingdom and the United States, have raised concerns over the political, economic and military roles China is playing in the African continent.
The Chinese Ministry of Foreign Affairs emphasizes China's developmental engagements with Africa, while also stating that China and Africa are making "joint efforts to maintain the lawful rights of developing countries and push forward the creation of a new, fair and just political and economic order in the world".
China and Africa have a history of trade relations, sometimes through third parties, dating back as far as 202 BC and AD 220. The first mention of Africa in Chinese sources was in the Yu-yang-tsa-tsu by Tuan Ch'eng-shih (died 863), a compendium of general knowledge where he wrote about the land of Po-pa-li (referring to Somalia).
Archaeological excavations at Mogadishu, Somalia and Kilwa, Tanzania have recovered many coins from China. The majority of the Chinese coins date to the Song Dynasty, although the Ming Dynasty and Qing Dynasty are also represented, according to Richard Pankhurst. In 1226 Chao Jukua, commissioner of foreign trade at Quanzhou in the Fujian province of China, completed his Chu-fan-chih (Description of Barbarous Peoples) which discusses Zanzibar (Ts'ong-pa) and Somalia (Pi-P'a-Lo).
In the 14th century, Moroccan traveler and scholar Ibn Battuta made a long journey to Africa and Asia. He reached China in April 1345 after a stay in India before serving as an envoy of Sultan Muhammad Tughlaq of the Indian Tughlaq dynasty to China. He wrote:
China is the safest, best regulated of countries for a traveler. A man may go by himself on a nine-month journey, carrying with him a large sum of money, without any fear. Silk is used for clothing even by poor monks and beggars. Its porcelains are the finest of all makes of pottery and its hens are bigger than geese in our country.
The Ming Dynasty voyages of Chinese admiral Zheng He and his fleet, which rounded the coast of Somalia and followed the coast down to the Mozambique Channel. The goal of those expeditions was to spread Chinese culture and signal Chinese strength. Zheng brought gifts and granted titles from the Ming emperor to the local rulers, with the aim of establishing a large number of tributary states. In October 1415, Chinese explorer and admiral Zheng He reached the eastern coast of Africa and sent the first of two giraffes as gifts to the Chinese Yongle Emperor.
Archaeologists have found Chinese porcelains made during the Tang dynasty (618–907) in Kenyan villages; however, these were believed to have been brought over by Zheng He during his 15th century ocean voyages. On Lamu Island off the Kenyan coast, local oral tradition maintains that 20 shipwrecked Chinese sailors, possibly part of Zheng's fleet, washed up on shore there hundreds of years ago. Given permission to settle by local tribes after having killed a dangerous python, they converted to Islam and married local women. Now, they are believed to have just six descendants left there; in 2002, DNA tests conducted on one of the women confirmed that she was of Chinese descent. Her daughter, Mwamaka Sharifu, later received a PRC government scholarship to study traditional Chinese medicine (TCM) in China.
National Geographic also published an article by Frank Viviano in July 2005, he visited Pate Island during the time he stayed on Lamu, ceramic fragments had been found around Lamu which the administrative officer of the local Swahili history museum claimed were of Chinese origin, specifically from Zheng He's voyage to east Africa. The eyes of the Pate people resembled Chinese and Famao and Wei were some of the names among them which were speculated to be of Chinese origin. Their ancestors were said to be from indigenous women who intermarried with Chinese Ming sailors when they were shipwrecked. Two places on Pate were called "Old Shanga", and "New Shanga", which the Chinese sailors had named. A local guide who claimed descent from the Chinese showed Frank a graveyard made out of coral on the island, indicating that they were the graves of the Chinese sailors, which the author described as "virtually identical", to Chinese Ming dynasty tombs, complete with "half-moon domes" and "terraced entries".
According to Melanie Yap and Daniel Leong Man in their book "Colour, Confusions and Concessions: the History of Chinese in South Africa", Chu Ssu-pen, a Chinese mapmaker, in 1320 had southern Africa drawn on one of his maps. Ceramics found in Zimbabwe and South Africa dated back to Song dynasty China. Some tribes to Cape Town's north claimed descent from Chinese sailors during the 13th century, their physical appearance is similar to Chinese with paler skin and a Mandarin sounding tonal language. Their name for themselves is "abandoned people", Awatwa in their language.
The establishment of modern Sino-African relations dates back to the late 1950s when China signed the first official bilateral trade agreement with Algeria, Egypt, Guinea, Somalia, Morocco and Sudan. Zhou Enlai made a ten-country tour to Africa between December 1963 and January 1964. Relations at that time were often reflective of China's foreign policy in general: China "began to cultivate ties and offer ... economic, technical and military support to African countries and liberation movements in an effort to encourage wars of national liberation and revolution as part of an international united front against both superpowers".
Early modern bilateral relations were mainly affected by the Cold War and the communist ideology. China originally had close ties with the anti-apartheid and liberation movement, African National Congress (ANC), in South Africa, but as China's relations with the Soviet Union worsened and the ANC moved closer to the Soviet Union, China shifted away from the ANC towards the Pan-Africanist Congress. China adopted several principles, among them supporting the independence of African countries while investing in infrastructure projects. The Somali Democratic Republic established good relations with the Soviet Union throughout the Cold War era. When Somalia sought to create a Greater Somalia, it declared war on Ethiopia, with the aid of the Soviet Union, Somalia took the Ogaden region in three months, but the Soviet Union shifted its support from Somalia to Ethiopia, and Ethiopia retook the Ogaden region. This angered Siad Barre, and expelled all Soviets advisors and citizens from Somalia, but Somalia maintained good relations with China, which segrated with the traditional Russian Communism. During the Cold War a few smaller nations also entered in alliances with China, such as Burundi under Michel Micombero.
The question of Taiwan has been a key political issue for the People's Republic of China (PRC). In 1971, the support of African nations was crucial in the PRC joining the United Nations (UN), taking over the seat of the ROC on Taiwan. However, while many African countries such as Algeria, Egypt and Zambia have stressed their support to "one-China policy", Swaziland and Burkina Faso are maintaining relations with Taipei. For the quest of a permanent UN seat for Africa, Nigeria, the largest African country, relies on Chinese support while Egypt looks to U.S. backing.
Since 1997, around 40 African heads of state have visited the PRC. The ministerial meeting, Forum on China-Africa Cooperation (FOCAC), held in Beijing in October 2000 was the first collective dialogue between the PRC and African nations.
In 1980, the total Sino-African trade volume was US$1 billion. In 1999, it was US$6.5 billion and in 2000, US$10 billion. By 2005, the total Sino-African trade had reached US$39.7 billion before it jumped to US$55 billion in 2006, making China the second largest trading partner of Africa after the United States, which had trade worth US$91 billion with African nations. The PRC also passed the traditional African economic partner and former colonial power France, which had trade worth US$47 billion. In 2010, trade between Africa and China was worth US$114 billion and in 2011, US$166.3 billion. In the first 10 months of 2012 it was US$163.9 billion.
There are an estimated 800 Chinese corporations doing business in Africa, most of which are private companies investing in the infrastructure, energy and banking sectors. Unconditional and low-rate credit lines (rates at 1.5% over 15 years to 20 years) have taken the place of the more restricted and conditional Western loans. Since 2000, more than $10bn in debt owed by African nations to the PRC has been canceled.
One-third of China's oil supplies comes from the African continent, mainly from Angola. Investments of Chinese companies in the energy sector have reached high levels in recent years. In some cases, like in Nigeria and Angola, oil and gas exploration and production deals reached more than $2 billion. Many of those investments are mixed packages of aid and loan in exchange for infrastructure building and trade deals.
In agriculture, Benin and the Sahel countries of Burkina Faso and Mali supply up to 20% of China's cotton needs. While Côte d'Ivoire supplies China with cocoa, large shipments of coffee are imported from Kenya. As for fish products, Namibia remains one of the main providers.
During the year 2011, trade between Africa and China increased a staggering 33% from the previous year to US $166 billion. This included Chinese imports from Africa equalling US $93 billion, consisting largely of mineral ores, petroleum, and agricultural products and Chinese exports to Africa totalling $93 billion, consisting largely of manufactured goods. Outlining the rapidly expanding trade between the African continent and China, trade between these two areas of the world increased further by over 22% year-over-year to US $80.5 billion during the first five months of the year 2012. Imports from Africa were up 25.5% to $49.6 billion during these first five months of 2012 and exports of Chinese-made products, such as machinery, electrical and consumer goods and clothing/footwear increased 17.5% to reach $30.9 billion. China remained Africa's largest trading partner during 2011 for the fourth consecutive year (starting in 2008).
The need to protect China's increased investments in Africa have driven a shift away from China's traditional non-interference in the internal matters of other countries to new diplomatic and military initiatives to try to resolve unrest in South Sudan and Mali.
During the December 2015 FOCAC meeting in Johannesburg, South Africa, Chinese President Xi Jinping pledged $60 billion over a three-year deal in loans and assistance to the African continent. China's effort is to support factories manufacturing goods for export. Along with roads and ports, Nigerian President Muhammadu Buhari showed his desire to finish stalled railway projects along the coastline, specifically a 1400 km railway from Lagos to Calabar representing approximately 200,000 jobs.
China strongly supported African Independence Movements and gave aid to newly independent African nations in the 1960s and 1970s. Among the most notable early projects was the 1,860 km TAZARA Railway, linking Zambia and Tanzania, which China helped to finance and build from 1970 to 1975. Some 50,000 Chinese engineers and workers sent to the continent to complete the project. By 1978, China was giving aid to more African countries than the United States.
China has been engaged in a kind of "health diplomacy" towards Africa since the 1960s. Health care development and medical assistance have been one of the main successful areas of cooperation. Between the early 1960s and 2005, more than 15,000 Chinese doctors have been sent to Africa to help treat different cases in more than 47 countries. The medical teams, known as yiliaodui, have treated more than 170 million patients during the same period.
In 2001, the member nations of G8, formed the United Nations-backed Global Fund to Fight AIDS, Tuberculosis and Malaria with an initial budget of $10 billion. In 2007, another additional $1.1 billion was approved in Kunming, China, of which 66% was dedicated to Africa. In September of the same year, China promised the Democratic Republic of the Congo to build 31 hospital units and 145 smaller health care centers, a project due to be completed in March 2010.
Military cooperation goes back to the Cold War period when China was keen to help African liberation movements. Apart from some traditional allies such as Somalia and Uganda, China also had military ties with non-aligned countries such as Egypt. Military equipment worth $142 million was sold to African countries between 1955 and 1977. Two decades after the collapse of the Soviet Union, military relations are now based on business interests rather than ideology.
More recently, China has sent troops to the continent to participate in peacekeeping. In 2004, China deployed around 1,500 military personnel under the UN umbrella, dispatched between Liberia and the Democratic Republic of the Congo, though only since 2011 has it sent infantry troops describable (arguably) as 'combat' forces. China also has military attachés 14 attachés in 14 different African countries as of 2007, while there are 18 African countries who maintain their attachés in Beijing. Apart from peacemaking, China provides military training and equipment to a few countries, though this does not require military forces to be deployed. During the December 2015 FOCAC meeting in Johannesburg, South Africa, Chinese President Xi Jinping restated "China strongly believes Africa belongs to the African people and African problems should be handled by the African people." China's latest military efforts are to combat terrorist radicalism, and not the local African conflicts.
An increasing number of African countries have shifted their source of supply from traditional providers such as Russia to China due in part to the competitive prices offered by Chinese suppliers. Arms sales by China to some African states have troubled Western critics who point out some buyers like Sudan are accused of war crimes.
In contrast to critics, Carter Ham, a former US Army General in charge of U.S. Africa Command, spoke in favor of the benefits and potential cooperation between China and the US in the African military sphere, offering as examples Chinese supplied patrol boats to the DRC military and building by Chinese contractors of a military institute in Tanzania as Chinese hardware that could be combined with US training to form joint assistance for African militaries.
Africa is a host of three Chinese cultural centers. The first overseas Chinese center was opened in Mauritius in 1988. Two other followed in Egypt and Benin. The Confucius Institute, which focuses on the promotion of the Chinese language and culture, has 20 centers distributed around 13 African countries.
Historically, little is known about early African immigration to China. Due to recent developments in relations, many have been relocating for better opportunities. Places dubbed 'Little Africa' and 'Chocolate city' are increasingly receiving new immigrants, mostly Nigerians. Most of the African immigrants are concentrated in the area of Guangzhou with an estimated number of 20,000. It is estimated that there are around 10,000 illegal African immigrants in China and police crackdowns have intensified since early 2009.
In contrast, early Chinese immigration to the African continent is slightly better documented. In 1724, a few Chinese convicts were brought as labourers to South Africa from the Dutch East Indies (modern-day Indonesia) by the colonial Dutch Empire. In the early 19th century, another wave of immigrants came to South Africa as workers brought by the British to work in agriculture, infrastructure building and mining. In recent years, there has been an increasing presence of Chinese in Africa with one estimate numbering Chinese nationals at one million.
There are a variety of critical perspectives scrutinizing the Chinese role in the relationship focused on the balance of the power relationship and human rights. Western countries have been the main source of accusations that China is a neo-colonist in Africa. As a response to such criticism, China issued the Nine Principles to Encourage and Standardise Enterprises' Overseas Investment, a charter and guide of conduct to Chinese companies operating abroad.
The China-Zimbabwe relationship drew the attention of such critics. China was accused of supplying Zimbabwe with jet fighters, vehicles and other military equipment. China declared in 2007 that it was dropping all kinds of assistance and limiting assistance to humanitarian aid. In July 2008, the Chinese diplomacy asked Mugabe "to behave" though critics see that as a way for China to protect its own interests in this country should a regime change.
Another high-profile event involving critics of China in Africa was in the run-up to the 2008 Summer Olympics. Human rights groups criticized China for its supportive relationship with the government of Sudan, which is accused of mass killings in Darfur. China is Sudan's largest economic partner, with a 40% share in their oil, and also sells Sudan small arms. China has threatened to veto UN Security Council actions to combat the Darfur crisis, and has argued that, "As the Darfur issue is not an internal affair of China, nor was it caused by China, to link the two together is utterly unreasonable, irresponsible and unfair."
Other criticisms are economic in nature including the claim that African markets are harmed by low-cost Chinese-made products, which put great competitive pressure on local industries and businesses. While some argue that PRC's involvement currently benefits primarily the elites, there have been instances of economic trickle-down effects.