The earliest mention of Bago in history is by the Arab geographer ibn Khordadbeh around 850 AD. At the time, the Mon capital had shifted to Thaton. The area came under rule of the Burmese from Bagan in 1056. After the collapse of Bagan to the Mongols in 1287, the Mon regained their independence.

From 1353–1539, Binnya U, descendant of the Thai chief Wareru, established Hanthawaddy as the capital of the Mon Hanthawaddy Kingdom, which covered all of what is now Lower Burma. The area came under Burman control again in 1539, when it was annexed by King Tabinshwehti of the Taungoo Dynasty.[1]:227 The kings of Taungoo made Bago their royal capital from 1539–1599 and again in 1613–1635, and used it as a base for repeated invasions of the Ayutthaya Kingdom.

As a major seaport, the city was frequently visited by Europeans, among these, Gasparo Balbi in the late 1500s. The Europeans often commented on its magnificence.

The Portuguese conquest of Pegu, following the destruction caused by the kings of Tangot and Arrakan in 1599, was described by Manuel de Abreu Mousinho in "Breve discurso em que se conta a conquista do Reino do Pegú na India oriental feita pelos portugueses em tempo do vice-rei Aires de Saldanha, sendo capitão Salvador Ribeiro de Sousa, chamado Massinga, natural de Guimarães, a quem os naturais do Pegú elegeram por seu rei no ano de 1600" (Brief narrative telling the conquest of Pegu in eastern India made by the Portuguese in the time of the viceroy Aires de Saldanha, being captain Salvador Ribeiro de Sousa, called Massinga, born in Guimarães, elected as their king by the natives in the year 1600), published from 1711 to 1829 with "Peregrinaçam" of Fernão Mendes Pinto.

Bago was rebuilt by King Bodawpaya (r. 1782-1819), but by then the river had shifted course, cutting the city off from the sea. It never regained its previous importance. After the Second Anglo-Burmese War, the British annexed Bago in 1852. In 1862, the province of British Burma was formed, and the capital moved to Yangon. The substantial differences between the colloquial and literary pronunciations, as with Burmese words, was a reason of the British corruption "Pegu".

In 1911, Hanthawaddy was described as a district in the Bago (or Pegu) division of Lower Burma. It lay in the home district of Yangon, from which the town was detached to make a separate district in 1880. It had an area of 3,023 square miles (7,830 km2), with a population of 48,411 in 1901, showing an increase of 22% in the past decade. Hanthawaddy and Hinthada were the two most densely populated districts in the province.

Hanthawaddy, as it was constituted in 1911, consisted of a vast plain stretching up from the sea between the To (or China Bakir) mouth of the Irrawaddy River and the Pegu Range. Except the tract of land lying between the Pegu Range on the east and the Yangon River, the country was intersected by numerous tidal creeks, many of which were navigable by large boats and some by steamers. The headquarters of the district was in Rangoon, which was also the sub-divisional headquarters. The second sub-division had its headquarters at Insein, where there were large railway works. Cultivation was almost wholly confined to rice, but there were many vegetable and fruit gardens.