The Burgraviate of Nuremberg (German: Burggrafschaft Nürnberg) was a state of the Holy Roman Empire from the early 12th to the late 15th centuries. As a burgraviate, it was a county seated in the town of Nuremberg; almost two centuries passed before the burgraviate lost power over the city, which became independent from 1219. Eventually, the burgraviate was partitioned to form Brandenburg-Ansbach and Brandenburg-Bayreuth.
Nuremberg was probably founded around the turn of the 11th century, according to the first documentary mention of the city in 1050, as the location of an Imperial castle between the East Franks and the Bavarian March of the Nordgau. From 1050 to 1571, the city expanded and rose dramatically in importance due to its location on key trade routes. King Conrad III established the burgraviate and the first administration and courts over the surrounding Imperial territories. The first burgraves were from the Austrian House of Raabs but, with the extinction of their male line around 1190, the burgraviate was inherited by the last count's son-in-law, of the House of Hohenzollern. From the late 12th century to the Interregnum (1254–73), however, the power of the burgraves diminished as the Staufen emperors transferred most non-military powers to a castellan, with the city administration and the municipal courts handed over to an Imperial mayor (German: Reichsschultheiß) from 1173/74. This castellan not only administered the imperial lands surrounding Nuremberg, but levied taxes and constituted the highest judicial court in matters relating to poaching and forestry; he also was the appointed protector of the various ecclesiastical establishments, churches and monasteries, even of the Bishopric of Bamberg. The privileges of this castellanship were transferred to the city during the late-14th and early-15th centuries. The strained relations between the burgraves and the castellan finally broke out into open enmity, which greatly influenced the history of the city.
Nuremberg is often referred to as having been the 'unofficial capital' of the Holy Roman Empire, particularly because Imperial Diets (Reichstage) and courts met at Nuremberg Castle. The Diets of Nuremberg were an important part of the administrative structure of the empire. The increasing demand of the royal court and the increasing importance of the city attracted increased trade and commerce to Nuremberg, supported by the Hohenstaufen emperors. Frederick II (reigned 1212–50) granted the Großen Freiheitsbrief (English: Great Letter of Freedom) in 1219, including town rights, Imperial immediacy (Reichsfreiheit), the privilege to mint coins and an independent customs policy, almost wholly removing the city from the purview of the burgraves. Nuremberg soon became, with Augsburg, one of the two great trade centers on the route from Italy to Northern Europe.