Certain points about it are of particular interest in this context.
First, Carcassonne's history is strongly connected to the history of the Gnostic Catharist movement. The city was a Catharist stronghold until the Albigensian Crusade. The Cathars of Carcassonne have since featured in many fictional, occultist and pseudo-historical works (e.g. Labyrinth and Holy Blood, Holy Grail).
In particular, the Cathars in Theodore Roszak's novel Flicker strongly resemble the Secret Senate, a cult of The King In Yellow. Roszak's Cathars infiltrate the movie industry in an attempt to corrupt the youth of the world into life-hating nihilism.
Second, the city's restoration by Viollet-le-Duc and his successors has certain similarities to the relationship between the cities of Hastur/Yhtill/Alar and Carcosa. Viollet-le-Duc's book on Carcassonne is available here (in French). Viollet's critics charged that he had destroyed the original medieval town to erect a fantasy city, which he then claimed was truer to reality than the original was.
Carcassonne has also been used as a fictional, unreachable city by Lord Dunsany, who was one of the major influences on Howard Phillips Lovecraft, particularly his Dreamlands tales. Dunsany's short story "Carcassonne" appeared in 1910 in the collection ''A Dreamer's Tales'', which is available here. In it, Carcassonne is a legendary city of beauty, inhabited by a nymph or witch.
"Far away it was, and far and far away, a city of gleaming ramparts rising one over other, and marble terraces behind the ramparts, and fountains shimmering on the terraces. To
Carcassonne the elf-kings with their fairies had first retreated from men, and had built it on an evening late in May by blowing their elfin horns."
It is prophesied by a nameless diviner, who comes to a feast but "has no place of honour" (The Stranger?) that the heroes, King Camorak and his warriors, will never reach Carcassonne. The King, his bard and his warriors attempt to defy the prophecy and Fate by reaching Carcassonne, but fail, and eventually die or vanish.
Carcassonne is also the title of a short story by William Faulkner, the "southern Gothic" writer. Written in 1931, it concerns a man who attempts to cheat death.
- Carcassone entry at the Arcana Wiki