The Expedition of Shuja ul-Mulk took place between 28 January 1833 to July 1834, whilst the siege of Kandahar took place on 10 May 1834, and ended sometime in July 1834. The expedition was led by Shah Shuja Durrani, the deposed Afghan Emperor who wished to re-claim his throne. Shah Shuja rallied forces while in exile in the Sikh Empire and marched through Sindh to Kandahar, besieging it. Shah Shuja would be defeated by the Barakzai rulers of Kandahar and Kabul.

Background
Following the death of Timur Shah Durrani, the Durrani Empire was plunged into a succession crisis with Timur Shah's 24 sons. Prominent sons of these would be Mahmud Shah Durrani, Zaman Shah Durrani, and Shah Shuja Durrani. Zaman Shah Durrani would take the throne after the death of Timur Shah in a succession crisis, where Mahmud Shah Durrani was confined to ruling the Realm of Herat, while Shah Shuja would work for Zaman Shah ordinated at Peshawar. Mahmud Shah would be forced to flee to Persia after Zaman Shah would invade Herat. Mahmud Shah would return on multiple attempts to seize the throne from his brother, finally succeeding in 1801. Shah Shuja Durrani would attempt to thwart Mahmud Shah's attempts, but was repelled and was forced to flee. 

Shah Shuja would return with rebel leaders, Sher Muhammad Khan to topple Mahmud Shah and would succeed, placing himself on the throne in 1803, making Mahmud Shah's reign last just under 2 years. 

Mahmud Shah Durrani returned in 1809, plotting to usurp the throne once again, Mahmud centralized his forces with Fateh Khan and his son, Kamran at Kandahar before marching to Kabul. Shah Shuja Durrani, seeing this had scrambled his forces at Jalalabad and met Mahmud Shah's army at the old Kabul-Jalalabad Road near Nimla. Shah Shuja had previously attempted a campaign in Kashmir, and his forces were repelled, hence he was unable to bring together a proper army to try and repel Mahmud Shah Durrani and his allies, being defeated in the Battle of Nimla.

Shah Shuja thus lost the crown and fled to exile in the Sikh Empire, where he began plans to reclaim Afghanistan under his own rule.

Siege of Kandahar
Seeking to launch another attempt to reclaim his rule in Afghanistan, Shah Shuja marched his men through the Bolan Pass in April, which coincided with Ranjit Singh moving from Lahore to attack Peshawar and dislodge Barakzai rule there. In May 1834, Shah Shuja finally reached Kandahar and laid siege to the city, but had trouble effectively storming it due to lack of siege equipment and poor quality of troops. Despite this, Shah Shuja had a great numerical superiority over his Barakzai enemies, with some estimations that his army had reached a size of over 80,000 men. Despite this, Shah Shuja feared the arrival of Dost Mohammad to aid his half-brothers in Kandahar, but still believed he was miles from reaching Kandahar. 

On the 29 of June, the Shah Shuja ordered his men to scale the walls of Kandahar with ladders, however they were defeated, with many being killed and wounded from the failed assault. Short skirmishes followed after this until Dost Mohammad Khan had arrived, who now began clashing with Shah Shuja's force. When Dost Mohammad arrived, skirmishes and clashes broke out even further, and at one point, Shah Shuja chose to fight in the day instead of night, wishing to give his soldiers time to rest after being fatigued. Thus, Shah Shuja began battle again and overcame Dost Mohammad's force, who was slowly being pushed back, as Shah Shuja's forces reached the walls of Kandahar. However, following this, much of the Barakzai troops who had drawn up on the flanks began engaging Shah Shuja's armies, with over 3,000 men under Dost Mohammad Khan and Sardar Mir Afzal Khan. Sardar Mir Afzal Khan himself attacked Shah Shuja. Shah Shuja, fearing to be captured, fled. When his forces saw them being abandoned, they abandoned and fled the battle-field. As during this, an English general, William Campbell was wounded and also captured by the Barakzai forces.

Aftermath
With this, Shah Shuja was forced to withdraw, and leave behind all his baggage. Amongst the baggage captured, Dost Mohammad found out of British aid in the expedition of Shah Shuja. This would not be the last attempt of Shah Shuja to seize the throne of Afghanistan, as in 1839, he, alongside British forces would contend with Dost Mohammad Khan for rule over Kabul in the First Anglo-Afghan War.

References

Battles involving Afghanistan
1830s in Afghanistan
1830s conflicts
Kandahar
Kandahar Province
Wars involving Afghanistan

See also
Mahmud Shah Durrani
Wazir Akbar Khan
First Anglo-Afghan War
Sikh Empire
Durrani Empire