The castle was built around 1090-1100 by Burkart von Fenis, the Bishop of Basel. In 1224, the castle and town of Erlach became the property of the Counts of Nidau. In 1265, Peter II of Savoy brought the counts and their castle under the feudal authority of the House of Savoy. While under Savoy control, Peter II appointed a warden to occupy the castle and manage the castle estates. The warden knights took their name from the castle and town and became known as the von Erlach family. The von Erlach family would later produce a number of famous leaders, including Rudolf von Erlach, the victorious Swiss commander during the Battle of Laupen. By 1300 the von Erlachs were citizens of the city of Bern. After the death of Isabella of Neuchatel, the widow of the last Count of Nidau, in 1395 Erlach was managed directly by the House of Savoy. They mortgaged the town to the de Chalon family in 1407.
In 1474 it was conquered by Bernese troops during the Burgundian Wars and remained under the control of the city of Bern. The first governor of the newly captured district was Rudolf von Erlach, who had been the castellan under the de Chalon family.