After Operation Barbarossa began, Kotov continued to serve at the academy. He took command of the 163rd Rifle Division of the 34th Army on the Northwestern Front on 30 September, leading it in defensive battles near Staraya Russa. Under the pressure of superior German forces, the division retreated to positions east of Demyansk. In January 1942 the division went over to the offensive and in conjunction with the 1st Guards Rifle Corps took part in the attacks which encircled German forces in the Demyansk Pocket. From February he served as chief of staff of the 51st Army of the Crimean Front, which retreated towards Kerch during the German offensive in the Battle of the Kerch Peninsula.
At 11:30 on May 11 (1942), 51st Army commander Vladimir Lvov was killed in a German air raid on the army command post, and Kotov succeeded to command of the army. In the face of the rapid German advance, confusion reigned at senior command levels: in his report Kotov wrote to front Stavka representative Lev Mekhlis that the "army military council has no plans and instructions from the front about further operations." The front had in fact drafted orders for the retreat of the army to the Turkish Rampart, but these were only delivered late. On 11 May the army attempted to extricate three of its divisions from partial encirclement, which was achieved thanks to the "exceptional heroism" of the 77th Rifle Division and the commitment of the remnants of the army tank brigade, as Kotov described the events in his report to Mekhlis. He reported that the 390th Rifle Division on the outer line of the encirclement ran from the front. While the 51st Army fought in encirclement in the Ak-Monay area, the German troops broke through the Turkish Rampart line. On 12 May the retreat to the Turkish Rampart was formally ordered and Mekhlis specifically instructed Kotov that the main goal of the retreat was not to get involved in fighting, but to "preserve personnel and equipment and reach the Turkish Rampart in time." This effort did not succeed in salvaging the situation and much of the 51st Army was killed or taken prisoner. Kotov organized the 17 May evacuation of the remnants of the army, numbering at least 6,000 men, across Kerch Strait to the North Caucasus.[3]
On 29 May, Kotov took command of the 47th Army, evacuated to the Kuban after its heavy losses at Kerch and assigned to the North Caucasian Front. The army was tasked with defending the Taman Peninsula on the east coast of the Sea of Azov against attack from Crimea. After the fall of Krasnodar in mid-August during the Battle of the Caucasus, the 47th Army retreated east to defend the port city and Black Sea Fleet naval base of Novorossiysk, as the neighboring 56th Army withdrew south towards the western Caucasus. This left the 47th Army isolated in the area of Novorossiysk, which Stavka decided to defend strongly. Kotov was placed in command of the Novorossiysk Defense Region on 18 August, responsible for the Taman Peninsula and Novorossiysk. The region combined the ships of the Azov Flotilla, its naval infantry, and the 47th Army under one command, totaling 15,000 men.
On the next day, German and Romanian troops of Army Group Ruoff began advancing towards Novorossiysk, where Krymsk came under attack. Kotov deployed a brigade and tank battalion to defend the area, but these troops were forced to retreat to positions seven kilometers north of Novorossiysk on 21 August. German troops moved within artillery range of the port two days later after capturing the Neberdzhaevskaya station. In late August, Kotov formed a new naval rifle brigade and battalion from sailors to defend the port. To reinforce Novorossiysk, Kotov began withdrawing the troops defending the Taman Peninsula. Maintaining an aggressive defense of the port, Kotov ordered a costly counterattack by the 77th Rifle Division on 25 August that retook the Neberdzhayevskaya station. The German troops resumed the advance on 29 August, making incremental gains, while the Romanian advance on Anapa cut off the naval infantry defending the Taman Peninsula, forcing their evacuation by sea. With the worsening situation, Kotov's orders to defend Novorossiysk "at all costs" were repeated on 30 August, and the 47th Army was reinforced by another rifle brigade and division, and smaller naval infantry units on 1 September. It was tasked with holding the defensive line north of Novorossiysk through Neberdzhayevskaya and Verkhnebakansky.
The final German assault with three divisions on the city began on 1 September. Soviet defenders on the Neberdzhayevskaya and Verkhnebakansky axis were encircled, but the majority managed to break out. Heavy fighting continued for the approaches to the city, during which high command representative Lavrentiy Beria, front commander Ivan Tyulenev and front chief of staff Pavel Bodin visited the city on 5 September. They relieved Kotov of command, replacing him with Andrei Grechko. In their report, Beria, Tyulenev, and Bodin described Kotov as having become "overwrought and unnerved and lost the trust of those who were encircled," and as being unable to "provide leadership due to the state of his health. In his postwar history of the battle of the Caucasus, Grechko wrote that Kotov and his headquarters were "unable to establish communications with the frontline units and failed to mobilize all troops to repel the enemy." Two days after his relief, the German infantry captured the port facilities of the city and by 10 September the city was fully occupied, but German forces were not able to advance significantly south of it during the Battle of the Caucasus. Although the port was lost, its prolonged defense diverted Army Group Ruoff from the drive towards the more strategic Caucasian oil region.
Kotov was left without an assignment until he became deputy commander of the 44th Army of the Northern Group of Forces of the Transcaucasian Front in October. The army fought in sustained defensive battles on the line from the mouth of the Terek to Gudermes. In December Kotov led a counterattack that pushed German troops back in the area north of Mozdok. From January 1943 he served as deputy commander of the 58th Army of the North Caucasian Front. For his performance as deputy commander of the 58th Army in the early 1943 Soviet counteroffensive in the North Caucasus, Kotov was awarded the Order of the Red Banner on 1 April 1943.[9]
In April Kotov was transferred to serve as deputy commander of the 46th Army, then in the Reserve of the Supreme High Command, which transferred to the Steppe Military District on 15 April and later the Southwestern Front (from October the 3rd Ukrainian Front).
From December Kotov commanded the 6th Guards Rifle Corps of the 3rd Ukrainian Front, which he led in the Nikopol–Krivoi Rog offensive, during which it took part in the liberation of Krivoi Rog on 22 February, the Bereznegovatoye–Snigirevka offensive, the Odessa Offensive, the Second Jassy–Kishinev offensive, and the occupation of Bulgaria. On 13 September 1944 he was promoted to lieutenant general.[11] At the beginning of November, during the Belgrade offensive, the corps was transferred to the 57th Army in preparation for the advance into southern Hungary. On 7 November, during the march to the Danube to join the army, Kotov was killed when American fighters attacked the corps headquarters column in the area of Niš, an action that began the Niš incident. He was buried in Odessa.