The Second Battle of Komárom, also known as the Battle of Ács, took place on 2 July 1849 between the Hungarian Revolutionary Army (led by General Artúr Görgei) and the Imperial Austrian Army of the Austrian Empire (led by Supreme Commander Field Marshal Julius von Haynau); a contingent of almost 12,000 Russian Empire troops was led by Lieutenant General Fyodor Sergeyevich Panyutyin. The Austrian army outnumbered the Hungarian troops two to one, and had a multitude of infantry (landwehr, grenadiers, seressaner, and kaiserjägers), light infantry (uhlans, dragoons, cossacks, and chevau-léger), heavy cavalry (cuirassiers), and better weapons. The Hungarians, except for the Landwehr (Hungarian: Honvéd) and the hussars, had few types of military units. Other problems also negatively impacted the Hungarian army. The Lajos Kossuth government decided to withdraw the Hungarian troops from Komárom to southern Hungary without consulting Görgei, the war minister, the only one authorised to make a military decision. Görgei grudgingly agreed to the decision, fixing the date of departure for southern Hungary to 3 July. Uncertainty and conflicts existed among the Hungarian officers and soldiers before the attack. Kossuth sent Lieutenant General Lázár Mészáros to Komárom to relieve Görgei of leadership and send him to Pest. When Mészáros approached Komárom by steamboat on 2 July, however, he heard gunfire from the battle and returned to Pest.
Austrian Supreme Commander Field Marshal Julius Jacob von Haynau planned to force the Hungarian troops to retreat to the fortress of Komárom; Haynau would besiege it from the south, opening the road toward Buda and Pest. After accomplishing this, most of Haynau's troops would advance east and occupy the Hungarian capitals before his allies (the Russian troops led by Ivan Paskevich) arrived. The battle began in the early morning of 2 July with an attack by the imperial I Corps (led by General Franz Schlick) from the direction of Ács, chasing the Hungarians from the Ács forest, pushing them into the fortifications south of Komárom, and capturing the Monostor trenches; this threatened to encircle the Hungarian troops. Görgei did not expect a major attack that day. Foreseeing that he would be dismissed and aware of the political animosity against him, he wrote a letter that night and early morning explaining his military decisions and attributing the military and political problems to Kossuth. Görgei stopped writing when he heard gunfire from the battle. He rushed to the battlefield and found the Hungarian VIII Corps in flight, leaving the fortress's western trenches and some fortifications in Austrian hands. Görgei halted the retreat with grapeshot and volley fire and ordered the troops to regroup and, with the support of II and VII Corps, chase Schlick's troops from the fortifications and the Ács forest. The Hungarian counter-attack, supported from the southern Herkály grange by VII Corps cavalry led by General Ernő Poeltenberg, threatened Schlick's left flank with separation from the rest of the imperial army. The imperial army was saved by the Russian division (led by Lieutenant General Fyodor Panyutyin) and the Austrian I Corps Simbschen-Brigade; Poeltenberg retreated to escape encirclement, stopping the Hungarian advance.
The Austrian IV Corps reserve brigade, led by General Lajos Benedek, occupied Ószőny and opened the route toward Buda and Pest. Hungarian III Corps General György Klapka ordered several counter-attacks to reoccupy the strategic position but, despite initial success, his troops were forced to retreat. Haynau was unaware of the battlefield situation and, believing his troops were victorious, ordered his center (IV Corps) to withdraw; this put his army in danger from a Hungarian attack. Görgei saw the opportunity, and intended to concentrate his cavalry and artillery units in the center. Haynau's brigade commanders (Simbschen, Ludwig, and Lederer) and Panyutyin recognized the danger and closed the gap. Görgei, wanting to retake Ószőny, decided to force the Austrians to send reinforcements from the flanks to the center with a cavalry and artillery attack. Klapka sent the III Corps cavalry to help him, hoping that this would force Benedek to withdraw his troops from Ószőny and send reinforcements to the center. The Hungarian hussar charge was commanded by Görgei and Poeltenberg, repelling Austrian cavalry units. Its artillery (which followed the cavalry) launched cannon fire which struck the Austrian headquarters in Csém from which Franz Joseph I of Austria was observing the battle, forcing Haynau, the headquarters and the emperor to retreat to Bana. The Hungarian cavalry attack, in which 24 hussar companies (3,000 riders) participated – the largest Hungarian cavalry charge of the revolution – achieved its objective, and Klapka recaptured Ószőny. Görgei, leading the hussars, was severely injured in the head by cannon fire. Bleeding, he tried to send orders to his troops until he fainted at the end of the battle.
The reinforced Austrian cavalry and artillery pushed the Hungarian cavalry back until both armies retreated from the battlefield at about 8:00 p.m. The battle may be regarded as a Hungarian victory; Haynau's plans to encircle the Hungarian troops in Komárom and occupy the Hungarian capitals failed, and his troops were forced to retreat from the strategic positions occupied by them during the battle. The destruction of the imperial army was prevented by Haynau's subordinates, who filled its gap before the Hungarian cavalry arrived. The day after the battle, the Hungarian generals learned about Kossuth's removal of Görgei from command; their protests forced the governor-president to allow Görgei to continue leading the Army of the Upper Danube. Görgei fought his way eastward in mid-July through northern Hungary against the five-times-larger Russian army, led by Ivan Paskevich.