The church was originally a parish church dedicated to John the Baptist. In 942 Transmar, the bishop of Tournai, came to consecrate the church as Sint-Janskerk.
Emperor Charles V wanted to teach rebellious Ghent a lesson by letting the insurgents pass through the city with a noose around their neck (the noose wearers) and in nightgowns. He wanted to keep Ghent under control forever by erecting the Spanjaardenkasteel on the site of St. Bavo's Abbey (located right next to the confluence of the Leie and the Scheldt). As a result, the canons of Sint-Baafs were obliged to move to another chapter place, which they found in 1539 in the Sint-Janskerk. The church became a collegiate church and was henceforth known as the Sint-Baafskerk (see Bavo). With the episcopal reorganization of the Netherlands in 1559, the diocese of Ghent was established; St Bavo's Church was elevated to a cathedral.
Until a few years ago, St. John's Church was still the parish church of the St. John's Parish and also of St. Bavo's Cathedral, the main church of the diocese of Ghent. A few years ago, however, the parishes of Sint-Michiels, Sint-Niklaas and Sint-Baafs were merged, and since then the Sint-Michielskerk has served as the parish church for the three former parishes. St Bavo's Cathedral now only functions as a cathedral.
Source: wikipedia