Carcosa was first introduced by Ambrose Bierce in his short story "An Inhabitant of Carcosa" (1886), presented as an ancient, mysterious, and barely described city recognized only in hindsight — after its destruction — by a character who once lived there.
Robert W. Chambers substantially expanded the concept in his 1895 collection "The King in Yellow," borrowing Bierce's name and elaborating it into a fictional setting whose most precise location is "the shores of Lake Hali, either on another planet, or in another universe."
The location became central to cosmic horror literature; Chambers added names such as Hali and Hastur, and H. P. Lovecraft and his admirers later incorporated these elements into their own stories set in the Cthulhu Mythos.