The Deutsches Afrika Korps (DAK), better known as the Afrika Korps (Africa Corps), was the name given to the initial two German armor divisions sent to Libya in 1941 as part of Operation sonnenblume ( sunflower). Commanded by Major General Erwin Rommel, the Afrika Korps would grow and change in character as Rommel received promotions and as other commanders took over, but its legendary mystique would forever be associated with Rommel, "the Desert Fox."

The DAK's 5th Light Division began to arrive in Libya in February 1941 (in August it was officially reconstituted as the 21st Panzer Division). Elements of the 15th Panzer Division arrived in April. At various times other units were added to, or subtracted from, the Afrika Korps. Thus at the time of Operation crusader (11 November–8 December 1941), the then-nonmotorized Afrika Division was attached, as was the Italian Savona Division. At the time of the Battle of El Alamein in November 1942, the DAK consisted of the 15th and 21st Panzer Divisions, the 90th and 164th Light Motorized Infantry Divisions, the Ramcke Parachute Brigade, the Italian Giovani Fascisti Regiment, and assorted supporting units. During the Tunisia Campaign, the 10th Panzer Division was added.

Because North Africa was an Italian theater, the DAK was technically subordinate to the Italian High Command and thus affected by the variable winds of coalition warfare. The commanders of the DAK often exceeded their authority and could always (and frequently did) appeal directly to Berlin. The DAK was also largely dependent on supply convoys. Thus the ebb and flow of the naval war in the Mediterranean directly influenced DAK operations, especially fuel supplies. As a consequence of a deteriorating naval situation for the Axis powers in the Mediterranean, most of the officers and men arrived in or departed from Africa by air, especially after 1941.

Joining with the better-trained and better-led Italian units shipped to Libya in early 1941, the DAK went on the offensive, advancing quickly to the Egyptian border and laying siege to Tobruk. It would be involved in British Operations brevity, battleaxe, and crusader and in the Battles of Gazala and El Alamein. It formed the core of Axis forces in the retreat across Libya to Tunisia and in the ensuing battles there including Kasserine Pass and El Guettar. The DAK ended the war serving under Italy's best general, Marshal Giovanni Messe, who commanded the First Italian Army. The DAK's last commander, General Hans Cramer, surrendered with the DAK on 13 May 1943.

More than 1 million Axis soldiers served in Africa, and 260,000 of them were German. Although the wisdom of sending German forces to Africa may be questioned, certainly the major mistake Adolf Hitler made was in not sending sufficient resources early. Lieutenant General Wilhelm Ritter von Thoma's study, prepared for Hitler before the dispatch of the DAK, recommended that Germany send four divisions or none to North Africa. This recommendation was based on the difficulty of supplying forces in North Africa and on all that would be required to conquer Egypt in conjunction with Italian forces. Had four divisions been sent at the beginning, Rommel in all probability would have secured the Suez Canal, and his victory would have had a major impact on the course of the war. But Hitler only made a halfhearted effort in a theater he always considered to be secondary. The majority of German forces arrived during the Tunisia Campaign, and only a small percentage of them belonged to the DAK.

In the North African fighting, 18,594 Germans died, with another 3,400 missing in action and presumed lost. Approximately 101,784 Germans became prisoners following the Allied conquest of Tunisia.