The siege lasted five months from July – December 1812, during which the left flank of Napoleon's "Great Army" (La Grande Armée) tried to gain a favorable position for an attack on Russian-controlled port city Riga, the capital of the Governorate of Livonia.
During Emperor Napoleon's Invasion of Russia, two corps were sent to towards the Baltic Sea via Courland and Lithuania in-order to secure his northern flank.
Governor-General Magnus Gustav von Essen, overestimating his opponent's options, ordered preparations for the siege and the burning of the suburbs, after doubt and cancellation — including those on the right bank.
Löwis of Menar's forces launched a counterattack in a western direction, and the Russian and British warships supporting it, moving up the Lielupe River, managed to reach Sloka and further Kalnciems.
On August 9, 1812, Martin, having decided that his further presence in Riga was not necessary, received permission to leave, but before that he took the British and Russian navies in a raid to the port of Danzig.
Belgard's regiment sent by Steinheil, with the task of forsaken through the brass Lielupe and tying the Prussian left wing at Gravendhall, collided with fierce resistance; Yorck von Wartenburg used the excitement and fatigue of Russian forces, moved on to attack and forced Steinheil to retreat towards Jelgava as a result of the Battle of Mezotne (Mesoten).
In mid-October, the Russians tried to carry out attacks in the direction of Ķekava and along the Lielupe River, but the Prussians managed to hold their recovered positions.
On October 14 (26) Essen was replaced with Filippo Paulucci and the Steinheil Corps was subjected to Peter Wittgenstein,[5] who was successfully fighting in the Polotsk neighborhood at the time.
But on December 8 Prussian forces, on Macdonald's orders, following the example of the entire Napoleon Great Army, began to withdraw from Russia.
[6] Essen died in Baldone sulphur spring on August 11, 1813; there is an unconfirmed version of suicide as a result of depression (from both drowning and shooting).