Sikh attacks on Delhi
Sikh attacks on Delhi were common in the second half of the 18th century. The Sikhs attacked Delhi 19 times between 1766 and 1788. Background 
Sikhs were very scornful towards Delhi due to the following reasons. Mughal Emperor Jahangir tortured Guru Arjan Dev to death. Guru Hargobind was imprisoned in the fort of Gwalior by Jahangir. Guru Tegh Bahadur was beheaded on the orders of Mughal Emperor Aurangzeb at Chandni Chowk. Guru Gobind Singh suffered a lot at the hands of Delhi. He lost his four sons, two in the Battle of Chamkaur and two were bricked alive by Wazir Khan (Sirhind). Banda Singh Bahadur was executed on the orders of Mughal Emperor Farrukhsiyar in Delhi. Sikhs suffered massacres like Chota Ghalughara and other persecutions in Punjab under the Mughal rulers. Prelude
In November 1764, Sikhs helped Jats of Bharatpur, under the command of Jawahir Singh, to capture Delhi after the Battle of Delhi (1764). First attack
After defeating Mughals in the Battle of Sirhind (1764), Sikhs plundered jagir of Najib-ud-daula. Najib appointed Afzal Khan to take care of Delhi. Sikhs raided the Paharganj region of the city. After this attack, the Sikhs reached the outskirts of Delhi in 1766 after fighting Najib-ud-duala in Sonepat and Panipat, collecting large amounts of booty in the process. In December 1767, the Sikhs again fought and defeated Najib-ud-duala in Karnal but missed an opportunity to become emperor makers of Delhi due to disagreements amongst their leaders. Second attack
Sikhs attacked Delhi in January 1770. They sacked Panipat and Karnal in the Raid of Panipat (1770) and entered the territories of Najib-ud-daula and attacked Delhi. Zabita Khan was sent to stop Sikhs. The Sikhs demanded a large amount of money for friendship, but the demand was declined by Zabita. Third attack
In 1770, Najib-ud-daula passed away and Zabita Khan became the chief of Rohilla. The Sikhs again came to Delhi and attacked Zabita Khan's territory. Details of Sikh invasion have been noted by French Missionary, Father Peere. Sikhs defeat Mughals
Nasir ul Mulk in 1772, he was appointed as the Governor of Sirhind. He had an army of 19,000 soldiers which consisted of Mughals, Afghans and Marathas. At the Battle of Kunjpura (1772), he was attacked by Sikh sardars Sahib Singh, Dyal Singh and Laja Singh with 6,000 soldiers. 500 men were lost on both sides. Nasir ul Mulk along with Daler Khan went to Kunjpura fort but Sikhs besieged fort for 13 days. On 14th day, the Mughals were defeated. Fourth attack
On 18 January 1774, the Sikhs invaded Delhi for the fourth time. They plundered Shahdara and the Mughal nobility. Fifth attack
In October 1774, the Sikhs attacked and ravaged Delhi. Sixth attack
One 15 July 1775, the Sikhs attacked and set fire to Paharganj and Jaisinghpur. Mughals failed to stop the Sikh advances. Seventh attack
The seventh attack happened in November 1776. The prime minister of the Mughal empire, Najaf Khan, was taken by surprise. Eighth attack
The eighth raid happened in September 1778. Sahib Singh encamped near the Shalimar garden. The Mughals invited the Sikhs to a feast. Ninth attack
On 1 October 1778, which was Dushera day the Sikh attacked Delhi and all the way to Rakabganj. They destroyed a Mosque which was created on the site of a previously destroyed Gurdwara. The Sikh remained in Delhi for one month after capture. Tenth attack
On 12 April 1781, after attacks by the Mughals to the Sikh, the Sikh marched toward Delhi. They sacked Baghpat and laid waste to Khekra. The Sikhs managed to intercept letters of Najaf Khan, thus an alarm was raised in Delhi. On the 13th they stormed Sardhana and Mawana. They pillaged Muradnagar. Manu Lal, the vaki of Begam Samru, sought immediate aid. Najaf Khan ordered Afrasiyab Khan to march on the Sikh, but they refused unless they were paid. Najaf had no money. On the 16th, the Sikh attacked Patparganj and Shahdara which were the suburbs of Delhi. People over 50 miles South of Delhi were terrified. Other Sikh armies conquered Sheikhpura and Barnawa. The amil of the place was wounded and fled. On the 17th, Najaf Khan marched to Karinana to protect his own estate. Najaf Khan marched with many generals against the Sikh as they continued to conquer the area around Delhi. Murtaza Khan and Gazi Khan had 4,100 troops ready to march against the Sikh. On the 20th, the Sikh crossed the Yamuna back into their own territory and started selling looted property and goods. On the 24th, 500 more Sikh crossed the river with 300 of them carrying booty. A skirmish occurred when Mir Mansu attacked the Sikh, eventually dying in battle. Eleventh attack
On March 28, 1782, Najaf Khan ordered Shafi to march against the Sikh with an army of 10,000. Najaf Khan would die soon after giving the orders. Shafi attacked the Sikh for two months before being summoned in Delhi and making negotiations with the Sikhs. As September began and the rainy season over the Sikh raided and looted everything from Delhi to Hardwar. Twelfth attack
In 1783, a body of 40,000 Sikhs camped at Delhi. Prince Mirza Shikoh was defeated and fled. The Sikh soldiers were divided into 3 groups. Two groups of 5,000 Sikhs each deployed at Majnu-ka-Tilla and Ajmeri Gate; whereas 30,000 Sikhs under Baghel Singh, Jassa Singh Ramgarhia and Jassa Singh Ahluwalia camped at a place known as Tees Hazari before attacking Red Fort. The Sikhs defeated the Mughals in the Battle of Delhi (1783) and captured Delhi. Jassa Singh Ahluwalia was placed on the takht of Delhi as Badshah Singh of Delhi but Jassa Singh Ramgarhia objected that without Dal Khalsa meeting no one can be placed on the throne, and instead enchained the throne and brought it back to the Ramgarhia Bunga, where it still sits today. Mughals agreed to construct 7 Sikh Gurudwaras in Delhi for Sikh Gurus. Gurudwaras
 Gurdwara Mata Sundri
 Gurdwara Bangla Sahib
 Gurdwara Rakab Ganj
 Gurdwara Sis Ganj
 Gurdwara Majnu Ka Tilla

Photo of Mughal Slab
Mughal slab from Delhi was roped with horse and brought to Amritsar in Punjab

Thirteenth attack

In December 1784, the Sikh raided and plundered the neighbourhoods of Delhi on instigation of Najaf Quli Khan. The Sikh quickly retreated before any counterattack. Fourteenth attack
In January 1786, the Sikh and Gujars raided the territory from Panipat to Delhi. Sikh numbering near 5,000 had plundered villages near Ghausgarh. The Sikh further ravaged Meerut, Hapur, and Gharmuktesar. Ravjoli Sindha marched to the Sikh with 7,000 calvary and 10 cannons. The Sikh marched back to their own territory. Fifteenth attack
On the 27th of July, 1787 500 Sikhs plundered everything from Agra to Delhi. Sixteenth attack
The sixteenth attack happened in August 1787. The Sikh once more attacked Shahdara. The Sikh fought with the imperial guards and defeated them. The Maratha General Madho Rao Phalke marched against the Sikh and fought them. In the fight, many men drowned in the river with a large number being killed or wounded. Shah Nizum-ud-Din and Deshmukh watched the violence and decided to join in. They attacked the Sikh with many bullets but retreated later on. Phalke surrendered while the rest of the generals fled. Seventeenth attack
The Sikh with Ghaulam Qadir attacked the Red Fort on October 30, 1787. Eighteenth attack
In early 1788, Ghulam Qadir's territory was unprotected. The Sikh attacked the territory which included Delhi. Nineteenth attack
On the night of March 12, 1788, the Sikhs with Najaf Quli Khan attacked the tent of Mughal Emperor Shah Alam II and slaughtered his men. The emperor managed to save himself by fleeing to a heavily guarded tent. References

History of Sikhism
History of Delhi