A deed from 1130 mentions Berthold von Pagin, ministerialis of Lothair III, emperor of the Holy Roman Empire, who gave his name to the town in the form of Peine. The castle, Burg Peine, dates to this era or before.
The 1201, the Hildesheim Chronicle describes a feud between the bishop Hartbert von Hildesheim and the brothers Ekbert and Gunzelin von Wolfenbüttel. Earl Gunzelin von Wolfenbüttel was the commander-in-chief of the German army and seneschal in attendance of Otto IV, emperor of the Holy Roman Empire. Gunzelin prevailed and won control of Burg Peine and the surrounding area.
South of the castle, Gunzelin founded the town of Peine in 1218 or 1220. In 1223, the settlement gained town privileges. Gunzelin's coat of arms has been the town's symbol ever since.
Otto I of Braunschweig-Lüneburg, bishop of Hildesheim, 1260–1279, gave Earl Wedekind von Poppenburg the castle, town and county of Peine as a fief. Otto later incorporated Peine as a market town.
Also in 1260, Peine earned the right to mint and issue coins and was, with a few interruptions, a mint for the bishopric of Hildesheim until 1428. In 1954 and 1956, two of the largest German medieval treasures of silver (95 pieces of round bullion, weighing 7.5 kg, dating from the 14th century) were found under the streets Stederdorfer Straße and Horstweg.