Between 600,000 and 200,000 years ago, the "Heidelberg Man" died at nearby Mauer. His jaw-bone was discovered in 1907; with scientific dating, his remains were determined to be the earliest evidence of human life in Europe.
In the 5th century BC, a Celtic fortress of refuge and place of worship were built on the Heiligenberg, or "Mountain of Saints". Both places can still be identified.
In 40 AD, a fort was built and occupied by the 24th Roman cohort and the 2nd Cyrenaican cohort (CCG XXIIII and CCH II CYR). The Romans built and maintained Castra (permanent camps) and a signalling tower on the bank of the Neckar. They built a wooden bridge based on stone pillars across the river Neckar. The camp protected the first civilian settlements that developed. The Romans remained until 260 AD, when the camp was conquered by German tribes.
Modern Heidelberg can trace its beginnings to the 5th century. The village Bergheim ("Mountain Home") is first mentioned in that period, in documents dated to 769 AD. Bergheim now lies in the middle of modern Heidelberg.
The people gradually converted to Christianity. In 863 AD, the monastery of St. Michael was founded on the Heiligenberg inside the double rampart of the Celtic fortress. Around 1130, the Neuberg Monastery was founded in the Neckar valley. At the same time, the bishopric of Worms extended its influence into the valley, founding Schönau Abbey in 1142. Modern Heidelberg can trace its roots to this 12th century monastery. The first reference to Heidelberg can be found in a document in Schönau Abbey dated to 1196. This is considered the founding date for Heidelberg.
In 1155, Heidelberg castle and its neighboring settlement were taken over by the house of Hohenstaufen. Conrad of Hohenstaufen became "Count Palatine of the Rhine" (German: Pfalzgraf bei Rhein). In 1195, the Palatinate passed to the House of Welf through marriage.
In 1225, Louis I, Duke of Bavaria obtained the Palatinate, and thus the castle came under his control. By 1303, another castle had been constructed for defense. In 1356, the Counts Palatine were granted far-reaching rights in the Golden Bull in addition to becoming Electors.
In 1386, the University of Heidelberg was founded by Rupert I, Elector Palatine. The University played a leading part in the era of humanism and reformation and the conflict between Lutheranism and Calvinism in the 15th and 16th centuries. Heidelberg's library, founded in 1421, is the oldest public library in Germany still intact. A few months after the proclamation of the 95 theses, in April 1518, Martin Luther was received in Heidelberg, to defend them.
In 1537 the castle located further up the mountain was destroyed in a gunpowder explosion. The duke's palace was built at the site of the lower castle.
In November 1619, the royal crown of Bohemia was offered to the Elector, Frederick V. (He was married to Elizabeth, eldest daughter of James I of Great Britain). He became known as the "winter king", as he reigned for only one winter before the Imperial house of Habsburg regained the crown by force.
This overthrow in 1621 marked the beginning of the Thirty Years' War. In 1622, after a siege of two months, the armies of the Catholic League, commanded by Johann Tserclaes, Count of Tilly, captured Heidelberg. He gave the famous Bibliotheca Palatina from the Church of the Holy Ghost to the Pope as a present. The Catholic Bavarian branch of the house of Wittelsbach gained control over the Palatinate and the title of Prince-Elector. In 1648, at the end of the war, Frederick V's son Charles I Louis, Elector Palatine, was able to recover his titles and lands.
To strengthen his dynasty, Frederick arranged the marriage of his daughter Liselotte to Philip I, Duke of Orléans, the brother of Louis XIV, king of France. In 1685, after the death of Charles Louis' son Elector Charles II, Louis XIV laid claim to his sister-in-law's inheritance. The Germans rejected the claim, in part because of religious differences between local Protestants and the French Catholics, as the Protestant Reformation had divided the peoples of Europe. The War of the Grand Alliance ensued. In 1689, French troops took the city and castle, bringing nearly total destruction to the area in 1693.
As a result of destruction due to repeated French invasions related to the War of the Palatinate Succession coupled with severe winters, thousands of Protestant German Palatines emigrated from the lower Palatinate in the early 18th century. They fled to other European cities (where the refugees were called "the poor Palatines") and especially to London. In sympathy for the Protestants, in 1709-1710, Queen Anne's government arranged transport for nearly 6,000 Palatines to New York. Others were transported to Pennsylvania. They worked off their passage and later settled in the English colonies.
In 1720, religious conflicts with the mostly Protestant citizens of Heidelberg after he assigned a major church for exclusively Catholic use caused the Roman Catholic Prince-Elector Charles III Philip to transfer his residence to nearby Mannheim. The court remained there until the Elector Charles Theodore became Elector of Bavaria in 1777 and established his court in Munich.