At the end of the 9th century a Slavonic fortress appeared on a promontory on the place of contemporary castle and neighbouring town parts. During the 11th century margraves of Vohburg took hold of adminstration of Cheb region and this territory became a part of Bavarian northern march. Already around 1125, on the place of Slavonic fortress, Diepold II. of Vohburg built a stone castle, which became a centre of ministerial administration of Cheb. Emperor Friedrich Barbarossa from the dynasty of Staufs, who personally came to Cheb in 1179, got this region in 1167. His visit caused rebuilding of original castle to imperial palace (bastioned imperial residence), whose basis was created by romanesque palace (1179 - 1189), defensive Black tower (1179 – 1189) and storeyed chapel of st. Martin, st. Erhard and st. Ursula (1180 – 1220). During the reign of Czech kings the palace became a royal castle. The last Czech king who resided there was George of Podebrady (+ 1471). Then the administration of the castle transferred to the town. In 1472 the castle was damaged by a fire. This event required extensive reconstruction works in 1475 – 1490. The palace was heightened on half-timbered floor, several utilitarian buildings were built up and in front of the castle grew two defensive towers (called Mlýnská – Mill and Skalní – Rocky). Radical transformation of the castle took place in baroque times when, as a result of building of a new brick town fortification, the castle was changed into a citadel. During the first half of the 18th century the castle started to decay and it was the same in the following century. In 1895 the castle fell to the town that made at least the most necessary reconstruction works in the area of the castle.