The subtitle sets the stage, letting the reader know that this will be a dreamy poem filled with fragments of some sort of vision. The speaker then actually begins the poem by introducing a palace that a real-world Mongol king and Chinese emperor built in the middle ages—calling this a "stately," or majestic and impressive, "pleasure-dome." Instead of describing the palace in detail, however, the speaker starts talking about a “sacred river” named "Alph." This river runs through caverns so big people can't even measure their true depth.
This river doesn't actually exist, but rather is a symbolically rich invention of Coleridge's. The name "Alph" is probably a shortening of the Greek letter alpha, which brings to mind theology: in the Bible's Book of Revelation, God announces, "I am the Alpha and the Omega," meaning the first and the last, the creator and the destroyer.
By naming the river "Alph," the speaker associates the river with this creative power—suggesting that the river itself is a symbol for human creativity. That the river runs into vast, "measureless" caverns and a "sunless sea" suggests that the speaker is just as interested in the hidden, irrational parts of the human mind as its well-lit, rational areas: indeed, the “sunless sea” is potentially a symbol for the unconscious, for death, or for sleep.
Fittingly for a poem written upon awakening from an opium-influenced dream, "Kubla Khan" doesn't follow a set formal pattern. It does, however, begin in very steady iambic tetrameter (four feet per line in an unstressed-stressed syllable pattern), only to be broken by line 5 (which is in iambic trimeter and begins with a trochee):
In Xanadu did Kubla Khan
A stately pleasure-dome decree:
Where Alph, the sacred river, ran
Through caverns measureless to man
Down to a sunless sea.
The poem also begins with a relatively smooth rhyme scheme: ABAAB. But in the following lines, the meter and rhyme scheme of the poem will shift radically. Throughout the poem, then, the speaker seems to establish a formal pattern only to break it, shifting meters and rhymes schemes with what feels like an unplanned fluidity—not unlike the river being described.
Underlying these formal shifts, however, is the speaker’s consistent and prolific use of alliteration (plus assonance and consonance). For example, each of the poem's first five lines contains a strong alliteration at the end of the line: "Kubla Khan," "dome-decree," "river, ran" "measureless to man," and "sunless sea." This heavy alliteration gives the poem a highly literary, "poetic" feel—which in turn emphasizes that this is all a dream, a vision, and not an even-handed, objective description of a real place. In other words, the poem sure does sound nice—which readers will see in the end is part of the point: ultimately, the speaker wants to build a "pleasure-dome" of his own through "music loud and long"—i.e., some sort of art, perhaps even poetry itself.
A note on context: in describing this palace, the speaker alludes to a 1613 travelogue by Samuel Purchas called Purchas his Pilgrimage. Purchas writes: “In Xandu did Cublai Can build a stately Pallace, encompassing sixteen miles of plaine ground with a wall…” According to Coleridge’s preface to the poem, he was reading Purchas’s book and taking a form of opium when he slipped into a dream; upon waking several hours later, he wrote “Kubla Khan.”
From its opening, then, the poem signals its debt to western accounts of an eastern culture: instead of supplying an objective account of Mongolian culture, it draws on western fantasies and projections, portraying that culture as exotic and different. This sense of difference is important to the speaker: it allows him to imagine human creativity outside the boundaries of his own culture—at a moment in intellectual history, the European enlightenment, when intellectuals prized reason and rationality and tended to dismiss the mind’s irrational powers and capacities.