The ancient and mysterious city of Carcosa was first named in the Ambrose Bierce short story, An Inhabitant of Carcosa. In Bierce's story, the city is barely described, and is viewed only in hindsight by a character who once lived there.
Later, the city was used more extensively in Robert Chambers' book of horror short stories published in 1895, titled The King In Yellow. Chambers had read Bierce's work extensively, and had borrowed a few other names (including, for instance, Hastur) from Bierce's work.
In Chamber's stories, and within the apocryphal play (also titled "The King in Yellow") which is mentioned several times within them, the city is a mysterious, ancient, and possibly cursed place. The most precise description of its ___location given is that it said to be located on the shores of Lake Hali in the Hyades. The descriptions given of it, however, make it clear that it must be located on another planet, or possibly even in another universe.
For instance:
Along the shore the cloud waves break, The twin suns sink behind the lake, The shadows lengthen In Carcosa Strange is the night where black stars rise, And strange moons circle through the skies, But stranger still is Lost Carcosa Songs that the Hyades shall sing, Where flap the tatters of the King, Must die unheard in Dim Carcosa. Song of my soul, my voice is dead, Die though, unsung, as tears unshed Shall dry and die in Lost Carcosa Cassilda's Song in "The King in Yellow" Act 1, Scene 2.
Later writers, including [H. P. Lovecraft] and his many admirers, became great fans of Chambers' work, and incorporated the name of Carcosa into their own stories, set in the Cthulhu Mythos. For instance, in some stories, Carcosa is the residence of the Great Old One Hastur. Occasionally, Hastur will alter reality and merge parts of Earth into Carcosa; usually bringing along unwilling people as well.