He took part in the landings at Anzio (Operation Shingle) in January 1944. Operation Shingle was an amphibious assault around the Italian town of Anzio in an attempt to outflank the Gustav Line and capture the Italian capital of Rome. In February O'Daniel assumed command of the 3rd Infantry Division from Major General Truscott, who was promoted to the command of VI Corps from Major General John P. Lucas, while still on the beachhead. While under his command the division repelled several furious German counterattacks, finally breaking out of the beachhead encirclement in May during Operation Diadem and driving to Rome, where he was promoted to the two-star rank of major general. He was also awarded the Army Distinguished Service Medal for his service in Italy.