The first mentioning of a settlement at present Bogor dates to the 5th century when the area was part of Tarumanagara, one of the earliest states in Indonesian history. After a series of defeats from the neighboring Srivijaya, Tarumanagara was transformed into the Sunda Kingdom, and in 669, the capital of Sunda was built between two parallel rivers, the Ciliwung and Cisadane. It was named Pakuan Pajajaran, that in old Sundanese means “a place between the parallel [rivers]”, and became the predecessor of the modern Bogor. In 1579, Pakuan was captured and almost completely destroyed by the army of Sultanate of Banten, ceasing the existence of the State of Sunda. The city was abandoned and remained uninhabited for decades.

In the second half of the 17th century during the dutch colonial period, the abandoned Pakuan (as most of West Java) while formally remaining under the Sultanate of Banten, gradually passed under control of the Dutch East India Company (VOC). The formal transition occurred on 17 April 1684 by signing an agreement between the Crown Prince of Banten and the VOC.

The first, and temporal, colonial settlement at Pakuan was a camp of lieutenant Tanoejiwa, a Sundanese employed by the VOC who was sent in 1687 to develop the area.It was seriously damaged by the eruption on 4–5 January 1699 of the Mount Salak volcano (Indonesian: Gunung Salak), however the concomitant forest fires removed much forest, leaving much area for the planned rice and coffee plantations. In a short time, several agricultural settlements appeared around Pakuan, the largest being Kampung Baru (lit. “new village”). In 1701, they were combined into an administrative district; Tanoejiwa was chosen as the head of the district and is regarded as the founder of the modern Bogor Regency.

In 1746, by the order of the Governor-General Gustaaf Willem van Imhoff, the Palace, a nearby Dutch settlement and nine native settlements were merged into an administrative division named Buitenzorg (Dutch for “beyond (or outside) concerns,” meaning “without worries” or “carefree,” cf. Frederick the Great of Prussia’s summer palace outside Potsdam, Sanssouci, with the same meaning in French.) Around the same time, the first reference to Bogor as the local name of the city was documented; it was mentioned in the administration report from 7 April 1752 with respect to the part of Buitenzorg adjacent to the Palace. Later this name became used for the whole city as the local alternative to Buitenzorg.

Buitenzorg, as well as the rest of Dutch colonial possession in Java, were given to the British for a brief period of time (1811-1816) when the British occupied Java to prevent their capture by Napoleonic France which then conquered the Netherlands. The head of the British administration Stamford Raffles moved the administrative center from Batavia to Buitenzorg and implemented new and more efficient management techniques.

Java, as well as Buitenzorg, was formally returned to the Dutch in 1816 and fell under the rule of United Kingdom of the Netherlands rather than VOC. The Buitenzorg Palace was reinstated as the summer residence of the Governor-General. A botanical garden was set up nearby in 1817,a legacy of Raffles, which was one of the world’s largest gardens in the 19th century.

During World War II Buitenzorg and the entire territory of Dutch East Indies were occupied by Japanese forces; the occupation lasted from 6 March 1942 until the summer of 1945. As part of the efforts by the Japanese to promote nationalist (and thus anti-Dutch) sentiments among the local population the city was given the Indonesian name Bogor.

As part of independent Indonesia, Bogor has a significant role in the cultural, scientific and economic development of the country and West Java in particular – in part due to the legacy of infrastructure built during the colonial period. Its special position was further reinforced by the transformation of the former summer residence of the governor-general into the summer palace of the President of Indonesia