The town was historically mentioned for the first time in 1107. At the time, it was a small Moravian village, named Glubcici, and was dominated by a large wooden castle. The town stood on the right bank of the Psina River, which from 1137 on formed the border between Moravia (then part of Duchy of Bohemia) and Silesia (then part of Duchy of Poland). The exact date of the city's founding is unknown, but it is traceable, back to 1224, that the city is also Lubschicz, a settlement founded by king Ottokar I. However, the town was destroyed by invading Mongolian hordes. During the city's rebuilding, the left bank of the Psina was also settled, and in 1270, city rights were granted to the town by Ottokar II.
During this time, a wall stood around the city, complete with watchtowers and a moat. A large church was also constructed in the town, and was assigned by Ottokar II to the Order of Saint John. In 1298, the town received expanded rights from Venceslaus II. The rights extended to the town were to serve as an example for other towns in the years that followed. In 1365, the town became the seat of a principality, and in 1482, the town was the seat of cadet branch of the Přemyslids. However, the last member of the family entered a Franciscan cloister. The city lost its status as a principality seat in 1503, and the principality ceased to exist. The city was transferred to the control of the principality of Krnov (Jägerndorf, Karniów).
In 1523, the Protestant Reformation reached the town, and in 1558, a Lutheran church and school were built in the town. In response to this, Franciscans and Jews were expelled from the city. During the Thirty Years' War, the city was completely destroyed, most devastatingly by the Swedes in 1645. The city came under the rule of Prussia in 1743 and was made the capital city of its Landkreis, or district. In 1781, the town's population stood at only, 2,637. In order to accommodate the city's expansion, the parts of the city's wall were torn down. The population stood at 4,565 in 1825, and 9,546 in 1870. After World War I and the creation of the Republic of Poland, the Silesian plebiscite was held in Upper Silesia. The percentage of 99.5% of Leobschütz citizens voted for Germany. The Silesian Uprisings did not directly affect the city, which had almost exclusively German-speaking inhabitants.
After Adolf Hitler came to power in 1933, the town hosted schools and training grounds for both the SS and the SA, becoming the honorary centre of the Nazi Party in province of Upper Silesia. The town's synagogue was burned down in 1938, the same year as Kristallnacht. On March 18, 1945, Soviet troops began a siege of the city, which was resisted by the 18th SS Panzergrenadierdivision (Tank grenadiers) and the 371st Wehrmachtsdivision. The siege ended on March 24, and the Red Army occupied the town. Approximately forty percent of the town was destroyed in the siege or by Soviet plundering in the first weeks of the occupation. After the Soviet occupation, the name of the town was changed to Głubczyce, its current name. The city was transferred, like most of Silesia, to the People's Republic of Poland. The remaining German population was replaced by Polish colonists and refugees transferred from the Kresy in the former Polish east. The city became seat of a county, or Powiat. Głubczyce lost that distinction in 1975, but regained it in 1999.