During the 1857 uprising against the East India Company, Kanpur (then spelled Cawnpore) had fallen to the rebel leader Nana Sahib. The Company forces led by Major General Henry Havelock recaptured the town on 17 July 1857. Soon after he arrived at Cawnpore, Havelock received news that Henry Lawrence, the British Resident in Awadh (referred to at the time as Oudh) had died, and that the Company forces were besieged and facing a defeat at Lucknow. Havelock decided to attempt to relieve Lucknow. He fought against the rebel forces blocking his way, winning victories at Unnao (or Unao) and Bashiratganj (or Bashiratgunj), though at a high cost in casualties. However, he was soon informed that the Gwalior army had also rebelled against Company rule. Havelock realized that his forces were not strong enough to fight their way to Lucknow, and returned to Cawnpore on 13 August to await reinforcements.
Once reinforced, the British forces began constructing a bridge over the Ganges River, but the rebel soldiers attacked the bridge from the northern bank. Havelock sent Brasyer's Sikhs regiment to cover the construction. The Sikh regiment forced the rebel soldiers to retreat, and the bridge was completed without further interference.
The reinforced British army under Havelock and Lieutenant General Sir James Outram then set out for Lucknow. They were able to enter the city, but became besieged themselves.
Another, larger, force under General Colin Campbell, the new Commander-in-Chief, India, gathered in Cawnpore to make a second relief of Lucknow. While he led his main force to Lucknow, Campbell left a detachment of about 1,500 men under Brigadier Charles Ash Windham to hold Cawnpore, the vital bridge of boats across the Ganges, and the entrenchment constructed to protect it. Windham had a reputation for bravery gained in the Crimean War, and was nicknamed "Redan" Windham, after a Russian fortification at Sevastopol.
Meanwhile, the Nana Sahib's lieutenant, Tantya Tope, had gathered an army to recapture Cawnpore. The core of this army was the Gwalior Contingent. This was a body of troops in the service of the ruler of Gwalior, but which was recruited and organised on the same lines as the Bengal Presidency Army of the East India Company. The Gwalior Contingent had mutinied against their British officers in June and July. They had since remained undecided as to their next course of action until Tantya Tope took charge of them, and led them to Kalpi on 9 November, where they crossed the Jumna River and moved east on Cawnpore.
By 19 November, Tantya Tope's advance guard of 6,000 dominated all the routes west and north-west of Cawnpore. Although Windham was aware that Campbell had gained success at Lucknow, he nevertheless decided not to wait for Campbell's force to return from Lucknow, but to attack Tantya Tope before he could threaten the entrenchment.
On 26 November, Windham's force drove back Tantya Tope's advance guard. However, the rebels' main body was close at hand. Windham tried to make an orderly withdrawal but some of his troops (a battalion made up of a mixed bag of detachments of several regiments) misbehaved, retreating without orders and looting drink and supplies when they reached the entrenchment.
Meanwhile, Campbell was withdrawing from Lucknow with 3,000 troops and a convoy containing 2,000 sick, wounded and non-combatants who had been evacuated from Lucknow. Hearing that Cawnpore was in danger, he left his infantry to protect the convoy and moved ahead with his cavalry and horse artillery. To his relief, when he arrived on the north bank of the Ganges late on 27 November, the bridge was still intact. Windham held the entrenchment, but the Tantya Tope's army had occupied the city of Cawnpore and the ground between the city and the Ganges.
Campbell crossed the bridge the next day. He deployed his artillery on the north bank of the river to fire on the rebels threatening the bridge, and then slowly filed the carts and other vehicles of the convoy across the bridge. The process took three days to complete. Although several officers urged Campbell to attack as soon as the north bank was evacuated, Campbell delayed for another five days while all the non-combatants were ferried down-river to safety. Campbell was later to be known for his caution and deliberation, becoming irreverently known as "Sir Crawling Camel".
The rebels had continued to make some attacks on the British positions. An attack on 5 December was beaten off. Campbell was now ready to make his own attack, having received 5,600 reinforcements with 35 guns. On 6 December, Windham opened a violent bombardment from the entrenchment to deceive the rebels that Campbell was about to attack their left. The real attack was made on their right, curling around the city of Cawnpore to threaten the rebels' links to Kalpiii. Campbell's artillery, which included many guns which were heavier than those possessed by the rebels, particularly the 24-pounders manned by the sailors of the Naval Brigade, was the decisive factor.
As the Gwalior Contingent broke and fled, the Nana Sahib's own retainers and adherents were defeated north of the city. The pursuit by Campbell's cavalry was pressed as hard as possible, capturing almost every gun and cart from the rebels. At Bithoor, the Nana Sahib's treasury was captured the next day, concealed in a well.
The rebels had attacked Cawnpore at the most favourable possible moment, under one of their most dynamic and charismatic leaders, and yet they had been defeated. From this point on, increasing numbers of British reinforcements were to arrive in India and the rebellion was doomed to defeat, although Tantya Tope and other determined leaders continued to resist for more than a year.