After the death of Aurangzeb in 1707, the Mughal Empire fell apart and declined in its ability to tax or govern most of the Indian subcontinent. In the northwestern region, particularly the Punjab, the creation of the Khalsa community of Sikh warriors by Guru Gobind Singh accelerated the decay and fragmentation of the Mughal power in the region. Raiding Afghans attacked the Indus river valleys but met resistance from both organised armies of the Khalsa Sikhs as well as irregular Khalsa militias based in villages. The Sikhs had appointed their own zamindars, replacing the previous Muslim revenue Collectors, which provided resources to feed and strengthen the warriors aligned with Sikh interests. Meanwhile, colonial traders and the East India Company had begun operations in India on its eastern and western coasts.
According to Ishtiaq Ahmed, Ranjit Singh's rule led to further persecution of Muslims in Kashmir, expanding the previously selective persecution of Shia Muslims and Hindus by Afghan Sunni Muslim rulers between 1752 and 1819 before Kashmir became part of his Sikh Empire. Bikramjit Hasrat describes Ranjit Singh as a "benevolent despot".
Ranjit Singh was born on 13 November 1780, to Maha Singh Sukerchakia and Raj Kaur – the daughter of Raja Gajpat Singh of Jind, in Gujranwala, in the Majha region of Punjab (now in Pakistan). His birth name was Buddh Singh, after his ancestor who was a disciple of Guru Gobind Singh, a Khalsa, and whose descendants created the Sukerchakia misl before the birth of Ranjit Singh, which became the most powerful of many small Sikh kingdoms in northwestern Southern Asia in the wake of the disintegrating Mughal Empire. The child's name was changed to Ranjit (literally, "victor in battle") by his father to commemorate his army's victory over the Muslim Chatha chieftain Pir Muhammad.
Ranjit Singh's fame grew in 1797, at age 17, when the Afghan Muslim ruler Shah Zaman, of the Ahmad Shah Abdali dynasty, attempted to annex Panjab region into his control through his general Shahanchi Khan and 12,000 Soldiers. The battle was fought in the territory that fell in Ranjit Singh controlled misl, whose regional knowledge and warrior expertise helped resist the invading army. This victory gained him recognition. In 1798, the Afghan ruler sent in another army, which Ranjit Singh did not resist. He let them enter Lahore, then encircled them with his army, blocked off all food and supplies, burnt all crops and food sources that could have supported the Afghan army. Much of the Afghan army retreated back to Afghanistan.
At age 15, Ranjit Singh married his first wife Mehtab Kaur, the only daughter of Gurbaksh Singh Kanhaiya and his wife Sada Kaur, and the granddaughter of Jai Singh Kanhaiya, the founder of the Kanhaiya Misl. This marriage was pre-arranged in an attempt to reconcile warring Sikh misls, wherein Mahtab Kaur was betrothed to Ranjit Singh. However, the marriage failed, with Mehtab Kaur never forgiving the fact that her father had been killed by Ranjit Singh's father and she mainly lived with her mother after marriage. The separation became complete when Ranjit Singh married his second wife Raj Kaur of Nakai Misl in 1798. Mehtab Kaur died in 1813.
In 1799, Raja Ranjit Singh's army of 25,000 Khalsa, supported by another 25,000 Khalsa led by his mother-in-law Rani Sada Kaur of Kanhaiya misl, in a joint operation attacked the region controlled by Bhangi Sikhs centered around Lahore. The rulers escaped, marking Lahore as the first major conquest of Ranjit Singh. The Sufi Muslim and Hindu population of Lahore welcomed the rule of Ranjit Singh. In 1800, the ruler of Jammu region ceded control of his region to Ranjit Singh.
Ranjit Singh ensured that Panjab manufactured and was self-sufficient in all weapons, equipment and munitions his army needed. His government invested in infrastructure in the 1800s and thereafter, established raw materials mines, cannon foundries, gunpowder and arm factories. Some of these operations were owned by the state, others operated by private Sikh operatives.
In 1801, Ranjit Singh proclaimed himself as the "Maharaja of Punjab", and agreed to a formal investiture ceremony, which was carried out by Baba Sahib Singh Bedi - a descendant of Guru Nanak. On the day of his coronation, prayers were performed across mosques, temples and gurudwaras in his territories for his long life. Ranjit Singh called his rule as "Sarkar Khalsa", and his court as "Darbar Khalsa". He ordered new coins to be issued in the name of Guru Nanak named the "NanakShahi" ("of the Emperor Nanak").
In 1802 Ranjit Singh, aged 22, took Amritsar from the Bhangi Sikh misl, paid homage at the Harmandir Sahib temple, which had previously been attacked and desecrated by the invading Afghan army, and announced that he would renovate and rebuild it with marble and gold.
On 1 January 1806, Ranjit Singh signed a treaty with the British officials of the East India Company, in which he agreed that his Sikh forces would not attempt to expand south of the Sutlej river, and the Company agreed that it would not attempt to militarily cross the Sutlej river into the Sikh territory.
In 1807, Ranjit Singh's forces attacked the Muslim ruled misl of Kasur and, after a month of fierce fighting, defeated the Afghan chief Qutb-ud-Din, thus expanding his empire North West towards Afghanistan. He took Multan in 1818, and the whole Bari Doab came under his rule with that conquest. In 1819, he successfully defeated the Afghan Sunni Muslim rulers and annexed Srinagar and Kashmir, stretching his rule into the north and the Jhelum valley, beyond the foothills of the Himalayas.
Ratan Kaur and Daya Kaur were wives of Sahib Singh Bhangi of Gujrat (a misl north of Lahore, not to be confused the state of Gujarat). After Sahib Singh's death, Ranjit Singh took them under his protection in 1811 by marrying them via the rite of chādar andāzī, in which a cloth sheet was unfurled over each of their heads. Ratan Kaur gave birth to Multana Singh in 1819, and Daya Kaur gave birth to Kashmira Singh in 1819 and to Pashaura Singh in 1821.
In 1813–14, Ranjit Singh's first attempt to expand into Kashmir was foiled by Afghan forces led by General Azim Khan, due to a heavy downpour, the spread of cholera, and poor food supply to his troops.
In July 1818, an army from the Punjab defeated Jabbar Khan, a younger brother of governor of Kashmir Azim Khan, and acquired Kashmir, along with a yearly revenue of Rs seventy lacs. Dewan Moti Ram was appointed governor of Kashmir.
In November 1819, Dost Mohammed accepted the sovereignty of the Maharaja over Peshawar, along with a revenue payment of Rs one lac a year. The Maharaja specifically ordered his forces not to harass or molest any civilian. In 1820 and 1821, Dera Ghazi Khan, Hazara and Mankera, with huge tracts of land between Jhelum and Indus, Singh Sagar Daob, were also annexed. The victories of Kashmir, Peshwar and Multan were celebrated by naming three newborns after them. Prince Kashmira Singh, Peshaura Singh and Prince Multana Singh were born to Daya Kaur and Ratan Kaur, wives of Ranjit Singh.
In 1823, Ranjit Singh defeated a large army of Yusufzai north of the Kabul River.
Singh allowed men from different religions and races to serve in his army and his government in various positions of authority. His army included a few Europeans, such as Jean-François Allard, but he did not employ British people, who were attempting to create a colony in the Indian subcontinent. Despite not employing them, he did maintain a diplomatic channel with the British; in 1828, he sent gifts to George IV and in 1831, he sent a mission to Simla to confer with the British Governor General, william Bentinck; while in 1838, he cooperated with them in removing the hostile Islamic Sultan in Afghanistan.
In 1834, Mohammed Azim Khan once again marched towards Peshawar with an army of 25,000 Khattak and Yasufzai tribesmen in the name of jihad, to fight against infidels. The Maharaja defeated the forces. Yar Mohammad was pardoned and was reinvested as governor of Peshawar with an annual revenue of Rs one lac ten thousand to Lahore Darbar.
The army under Ranjit Singh was not limited to the Sikh community. The Soldiers and troop officers included Sikhs, but also included Hindus, Muslims and Europeans. Hindu Brahmins and people of all creeds and castes served his army, while the composition in his government also reflected a religious diversity. His army included Polish, Russian, Spanish, Prussian and French officers. In 1835, as his relationship with the British warmed up, he hired a British officer named Foulkes.
In 1837, the Battle of Jamrud and his march through Kabul in 1838, in cooperation with the colonial British army stationed in Sindh, became the last confrontation between the Sikhs led by him and the Afghans, which helped extend and establish the western boundaries of the Sikh Empire.
Singh is remembered for uniting Sikhs and founding the prosperous Sikh Empire. He is also remembered for his conquests and building a well-trained, self-sufficient Khalsa army to protect the empire. He amassed considerable wealth, including gaining the possession of the Koh-i-Noor Diamond from Shuja Shah Durrani of Afghanistan, which he left to Jagannath Temple in Puri, Odisha in 1839.
The Muslim accounts of Ranjit Singh's rule were questioned by Sikh historians of the same era. For Example, Ratan Singh Bhangu in 1841 wrote that these accounts were not accurate, and according to Anne Murphy, he remarked, "when would a Musalman praise the Sikhs?" In contrast, the colonial era British military officer Hugh Pearse in 1898 criticised Ranjit Singh's rule, as one founded on "violence, treachery and blood". Sohan Seetal disagrees with this account and states that Ranjit Singh had encouraged his army to respond with a "tit for tat" against the enemy, violence for violence, blood for blood, plunder for plunder.
Ranjit Singh's policies were based on respect for all communities, Muslim, Hindu and Sikh. . A devoted Sikh, Ranjit Singh restored and built historic Sikh Gurdwaras – most famously, the Harmandir Sahib, and used to celebrate his victories by offering thanks at the Harmandar. He also joined the Hindus in their temples, prohibited cow slaughter out of respect for Hindu sentiments , and visited Sufi mosques and holy places. He ordered his Soldiers to neither loot nor molest civilians.
Towards the end of 18th century, the five most powerful misls were those of Sukkarchakkia, Kanhayas, Nakkais, Ahluwalias and Bhangi Sikhs. Ranjit Singh belonged to the first, and through marriage had a reliable alliance with Kanhayas and Nakkais. Among the smaller misls, some such as the Phulkias misl had switched loyalties in the late 18th century and supported the Afghan army invasion against their Khalsa brethren. The Kasur region, ruled by Rajput-Muslim, always supported the Afghan invasion forces and joined them in plundering Sikh misls during the war.
The mid 19th-century Muslim historians, such as Shahamat Ali who experienced the Sikh Empire first hand, presented a different view on Ranjit Singh's Empire and governance. According to Ali, Ranjit Singh's government was despotic, and he was a mean monarch in contrast to the Mughals. The initial momentum for the Empire building in these accounts is stated to be Ranjit Singh led Khalsa army's "insatiable appetite for plunder", their Desire for "fresh cities to pillage", and entirely eliminating the Mughal era "revenue intercepting intermediaries between the peasant-cultivator and the treasury".