information:filtering, structural:reformatting
Early Modern to Modern periods (1500–1949)

Numerous eminent scholars and preachers visited the city from across India and South Asia. Guru Nanak visited Varanasi for Maha Shivaratri in 1507,Kashi(Varansi) p that played a large role in the founding of Sikhism.

In 1567 or thereabouts, the Mughal emperor Jallaludin Muhammad Akbar sacked the city of Varanasi on his march from Allahabad (modern Prayagraj). However, later the Kachwaha Rajput rulers of Amber (Mughal vassals themselves) most notably under Raja Man Singh rebuilt various temples and ghats in the city.

The Raja of Jaipur established the Annapurna Mandir, and the 200-metre (660 ft) Akbari Bridge was also completed during this period. The earliest tourists began arriving in the city during the 16th century. In 1665, the French traveller Jean-Baptiste Tavernier described the architectural beauty of the Vindu Madhava temple on the side of the Ganges. The road infrastructure was also improved during this period. It was extended from Kolkata to Peshawar by Emperor Sher Shah Suri; later during the British Raj it came to be known as the famous Grand Trunk Road. In 1656, Emperor Aurangzeb ordered the destruction of many temples and the building of mosques, causing the city to experience a temporary setback. However, after Aurangzeb's death, most of India was ruled by a confederacy of pro-Hindu kings. Much of modern Varanasi was built during this time, especially during the 18th century by the Maratha and Bhumihar Brahmin rulers. The kings governing Varanasi continued to wield power and importance through much of the British Raj period, including the Maharaja of Benares, or simply called by the people of Benares as Kashi Naresh.

The Kingdom of Benares was given official status by the Mughals in 1737, and the kingdom started in this way and continued as a dynasty-governed area until Indian independence in 1947, during the reign of Vibhuti Narayan Singh. In the 18th century, Muhammad Shah ordered the construction of an observatory on the Ganges, attached to Man Mandir Ghat, designed to discover imperfections in the calendar in order to revise existing astronomical tables. Tourism in the city began to flourish in the 18th century. As the Mughal suzerainty weakened, the Benares zamindari estate became Banaras State, thus Balwant Singh of the Narayan dynasty regained control of the territories and declared himself Maharaja of Benares in 1740. The strong clan organisation on which they rested, brought success to the lesser known Hindu princes. There were as many as 100,000 men backing the power of the Benares rajas in what later became the districts of Benares, Gorakhpur and Azamgarh. This proved a decisive advantage when the dynasty faced a rival and the nominal suzerain, the Nawab of Oudh, in the 1750s and the 1760s.

An exhausting guerrilla war, waged by the Benares ruler against the Oudh camp, using his troops, forced the Nawab to withdraw his main force. The region eventually ceded by the Nawab of Oudh to the Benares State, a subordinate of the East India Company, in 1775, who recognised Benares as a family dominion. In 1791 under the rule of the British, resident Jonathan Duncan founded a Sanskrit College in Varanasi. In 1867, the establishment of the Varanasi Municipal Board led to significant improvements in the city's infrastructure and basic amenities of health services, drinking water supply and sanitation.

Rev. M. A. Sherring in his book The Sacred City of Hindus: An account of Benaras in ancient and modern times published in 1868 refers to a census conducted by James Prinsep and put the total number of temples in the city to be around 1000 during 1830s. He writes,

The history of a country is sometimes epitomised in the history of one of its principal cities. The city of Benaras represents India religiously and intellectually, just as Paris represents the political Sentiments of France. There are few cities in the world of greater antiquity, and none that have so uninterruptedly maintained their ancient celebrity and distinction.

Author Mark Twain wrote in 1897 of Varanasi,

Benares is older than history, older than tradition, older even than legend, and looks twice as old as all of them put together.

Benares became a princely state in 1911, with Ramnagar as its capital, but with no jurisdiction over the city proper. The religious head, Kashi Naresh, has had his headquarters at the Ramnagar Fort since the 18th century, also a repository of the history of the kings of Varanasi, which is situated to the east of Varanasi, across the Ganges. The Kashi Naresh is deeply revered by the local people and the chief cultural patron; some devout inhabitants consider him to be the incarnation of Shiva.

Annie Besant founded the Central Hindu College, which later became a foundation for the creation of Banaras Hindu University in 1916. Besant founded the college because she wanted "to bring men of all religions together under the ideal of brotherhood in order to promote Indian cultural values and to remove ill-will among different sections of the Indian population."

Varanasi was ceded to the Union of India in 1947, becoming part of Uttar Pradesh after Indian independence. Vibhuti Narayan Singh incorporated his territories into the United Provinces in 1949.