The state was established in 1724 by the Afghan Sardar Dost Mohammed Khan, who was a commander in the Mughal army posted at Mangalgarh, which lies to the north of the modern city of Bhopal. Taking advantage of the disintegration of the Mughal empire, he usurped Mangalgarh and Berasia (now a tehsil of the Bhopal District). Sometime later, he helped the Gond Queen Kamalapati by executing her husband's assassins and restoring the little Gond kingdom back to her. The Queen gave him a princely sum of money and the Mouza village (which is situated near modern Bhopal city).
After the death of last Gond queen, Dost Mohammed Khan took his chance and seized the little Gond Kingdom and established his capital 10 km away from modern Bhopal, at Jagdishpur. He named his capital Islamnagar, meaning the city of Islam. He built a small fort and some palaces at Islamnagar, the ruins of which can still be seen today. After few years, he built a bigger fort situated on the northern bank of the Upper Lake. He named this new fort Fatehgarh ("the fort of victory"). Later the capital was shifted to the current city of Bhopal.
Although Dost Mohammed Khan was the virtual ruler of Bhopal, he still acknowledged the suzerainty of the declining Mughal Empire. His successors however, acquired the title of "Nawab" and declared Bhopal an independent state. By the 1730s, the Marathas were expanding into the region, and Dost Mohammed Khan and his successors fought wars with their neighbors to protect the small territory and also fought among themselves for control of the state. The Marathas conquered several nearby states, including Indore to the west and Gwalior to the north, but Bhopal remained a Muslim-ruled state under Dost Mohammed Khan's successors. Subsequently, Nawab Wazir Mohammed Khan, a general, created a truly strong state after fighting several wars.
Nawab Jehangir Mohammed Khan established a cantonment at a distance of one mile from the fort. This was called Jehangirabad after him. He built gardens and barracks for British guests and soldiers in Jehangirabad.
In 1778, during the First Anglo-Maratha War, when the British General Thomas Goddard campaigned across India, Bhopal was one of the few states that remained friendly to the British. In 1809, during the Second Anglo-Maratha War, General Close led a British expedition to Central India. The Nawab of Bhopal petitioned in vain to be received under British protection. In 1817, when the Third Anglo-Maratha War broke out, a treaty of dependence was signed between the British Government of India and the Nawab of Bhopal. Bhopal remained a friend of British Government during the British Raj in India.
In February-March 1818, Bhopal became a princely state in British India as a result of the Anglo-Bhopal treaty between the East India Company and Nawab Nazar Muhammad (Nawab of Bhopal during 1816-1819). Bhopal state included the present-day Bhopal, Raisen, and Sehore districts, and was part of the Central India Agency. It straddled the Vindhya Range, with the northern portion lying on the Malwa plateau, and the southern portion lying in the valley of the Narmada River, which formed the state's southern boundary. Bhopal Agency was formed as an administrative section of Central India, consisting the Bhopal state and some princely states to the northeast, including Khilchipur, Narsingarh, Raigarh, and after 1931 the Dewas states. It was administered by an agent to the British Governor-General of India.