He served as a staff officer under the command of Generalmajor Walter Nehring beginning in March 1942 upon Nehring's transfer to Africa. Later, he served under Erwin Rommel and Wilhelm von Thoma. When Rommel left Tunisia in March 1943 after the failed attack during the Battle of Medenine (Operation Capri), Bayerlein was appointed German liaison officer under the new commander, Italian Giovanni Messe. He was sent to Italy before the German troops in Tunisia surrendered on 12 May 1943. Bayerlein was sent to the Eastern Front in October 1943, to lead the 3rd Panzer Division, which was surrounded at Kirovograd. Bayerlein led a breakout through the Soviet encirclement.