The Afrika Korps was a term the Allied news and media used to refer to the German Africa Corps led by Erwin Rommel. The Afrika Korps was formed to assist Italy in the North African theatre of war. It's ferocious combat performance gave it decisive early gains and victories in North Africa, threatening Allied footholds in the region.
The Afrika Korps formed upon Adolf Hitler's personal orders on 11 January 1941. Hitler picked Erwin Rommel to be their commander on 12 February 1941 (Rommel himself landed on African soil in Libya on 14 February 1941 to begin leading his forces that would be brought into action). The German Armed Forces High Command (Oberkommando der Wehrmacht, OKW) and Army High Command (Oberkommando des Heeres, OKH) had decided to send a "blocking force" (Sperrverband) to Libya to support the Italian army. The Italian army group had been routed by the British Commonwealth Western Desert Force in Operation Compass (9 December 1940 – 9 February 1941).
The German "blocking force", commanded by Rommel, at first consisted of only the 5./leichte "Afrika" Panzer Regiment, which was quickly cobbled together from the second regiment of the 3./Panzer Division and various other small units attached for water treatment and medical care. These elements were organized into the 5th Light Division when they arrived in Africa from 10 February – 12 March 1941.
In late April and into May, the 5th Light Division was joined by transference of the various elements constituting the 15th Panzer Division from Italy, though it did not completely arrive until after Rommel had made a counter-offensive and re-taken most of Cyrenaica and then subsequently gone back over to the defensive. At this time, the Afrikakorps consisted of the two divisions plus various smaller supporting units, and was officially subordinated to the Italian chain of command in Africa (though Rommel had conducted his offensive without any authorization).
On 15 August 1941, the German 5./leichte "Afrika" Division was redesignated 21st Panzer Division (commonly written as 21./PD), still attached to the enlarged entity still known as the Afrikakorps.During the summer of 1941, the OKW and OKH invested more command structure in Africa by creating a new headquarters called Panzer Group Africa (Panzergruppe Afrika). On 15 August, Panzer Group Africa was activated with Rommel in command, and command of the Afrikakorps was turned over to Ludwig Crüwell. The Panzer Group controlled the Afrikakorps plus some additional German units that were sent to Africa, as well as two corps of Italian units. (A German "group" was approximately the equivalent of an army in other militaries, and in fact, Panzer Group Africa was redesignated as Panzer Army Africa (Panzerarmee Afrika) on 30 January 1942.)After the defeat at El Alamein and the Allied landings in Morocco and Algeria Operation Torch, the OKW once more upgraded its presence in Africa by creating the XC Army Corps in Tunisia on 19 November 1942, and then creating a new 5th Panzer Army headquarters there as well on 8 December, under the command of Colonel-General Hans-Jürgen von Arnim.On 23 February 1943, Panzer Army Africa—now called the German-Italian Panzer Army—was redesignated as the Italian 1st Army and put under the command of Italian general Giovanni Messe, while Rommel was placed in command of a new Army Group Africa (Heeresgruppe Afrika), created to control both the Italian 1st Army and the 5th Panzer Army.
The remnants of the Afrikakorps and other surviving units of the 1st Italian Army retreated into Tunisia. Command of the Army Group was turned over to von Arnim in March. On 13 May, remnants of the Afrikakorps surrendered, along with all other remaining Axis forces in North Africa