The first castle on the site was probably a wooden manor house built around 1000 and owned by a ministerialis family in service to either the Counts of Aargau or of Lenzburg. Based on archeological excavations, it was built on an island between two small streams and surrounded by a wooden palisade. While the local nobleman occupied the house and island, his men built a village along the streams. Later the streams were dammed to prevent flooding.
Around the end of the 11th century, the original house expanded. A 70–90 centimeters (2.3–3.0 ft) tall stone wall was built around the house. However all the buildings inside the wall remained wooden. According to tradition, the castle was attacked and damaged during the 12th century.
In the 13th century, Zug came under the control of the Kyburgs. They founded the city of Zug (around 1200) and had the ruined castle was rebuilt in stone. A 9 by 9 m (30 by 30 ft) tower with 2 m (6.6 ft) thick first story walls was built. The walls taper slightly and upper story walls are only about 1.5 m (4.9 ft) thick to a height of 16 m (52 ft). The tower was surrounded by two semi-circular walls to the north and east. By the end of the 13th century the town was surrounded by an, up to 16 m (52 ft) high, wall and additional defensive works.
When the Kyburg family died out in 1264, the city and castle of Zug were inherited by the Habsburgs. The castle living quarters were expanded and a number of buildings were added between the tower and city wall. After the Habsburg defeat at the Battle of Morgarten in 1315, Zug became a Habsburg stronghold in an increasingly hostile Swiss Confederation. The surrounding cities of Zurich, Lucerne and Glarus joined the Confederation and the nearby villages began to side with the Swiss, however, Zug city remained strongly tied to the Habsburgs. When the Confederation invaded Zug, the surrounding villages immediately surrendered. After a two-week siege, Zug Castle and city fell to the Swiss. The castle was not damaged in the siege and became a Confederation castle. After Zug joined the Confederation as a full member, the castle gradually lost its importance.
Around 1555 Johannes Zurlauben had the old wall demolished and a decorative wall built around the castle. He had a half-timbered structure built on the west side of the tower. In the 16th century the old Habsburg living quarters were expanded and connected to the Zurlauben structure.
The castle was purchased by the municipality of Zug in 1945 from the Hediger family and later renovated in 1982. Recently, the castle contained the Zug town and cantonal museum's permanent collection along with other exhibits. In 2012, the museum was closed for refurbishment and re-opened in November 2013 with a new permanent collection.