The first traces of settlement on the San Miguel hills that dominate the city date back to the Neolithic period. The first permanent settlement was an oppidum from the Iron Age (700-500 BC), which was located on the site of the current ruins of the Burgos Castle. In Roman times, the area was on the connecting road between Asturica Augusta (Astorga) and Burdigala (Bordeaux), but there are no traces of a larger settlement. In the 7th/8th century, the area around Burgos was reconquered from the hands of the Moors by the Kings of Asturias. A castle was built in 884 by the Castilian Count Diego Rodríguez Porcelos on the orders of King Alfonso III of Asturias as an important fortification in the fight against the Moors. In 931, Fernán González, the first Count of Castile independent of the Kingdom of León, made Burgos the capital of his domain. In the 11th century, Burgos became the coronation city of the Kings of Castile, which underlines its special importance. The most famous Spanish hero of the Middle Ages, Rodrigo Díaz de Vivar, known as El Cid, also came from the immediate vicinity of the city. He is buried together with his wife Jimena in the Burgos Cathedral, which was built later. After the conquest of Toledo by Alfonso VI (1085), Burgos' importance declined somewhat, but the city remained an important economic, cultural and political center in northern Spain. The Convento de San Pablo was a Dominican monastery founded in 1224 that existed until 1835. The Jewish convert and Bishop of Burgos Paulus de Santa Maria was buried there in 1435.
During the Spanish Civil War, Burgos was the base of General Franco's nationalist government.