This is from the Penguin Classics edition of his complete poems. The book has substantial notes about all of the poems, and in relation to the Rime of the Ancient Mariner it quotes the "Biographia Literaria" (ed James Engell and W Jackson Bate, 1983):
Describing his collaboration with Wordsworth, Coleridge says, "The thought suggested itself that a series of poems might be composed of two sorts. In the one, incidents and agents were to be, in part at least, supernatural, and the excellence aimed at was to consist in the interesting of the affections by the dramatic truth of such emotions, as would naturally accompany such situations, supposing them real... In this idea originated the plan of the Lyrical Ballads, in which it was agreed that my endeavours should be directed to persons and characters supernatural, or it least romantic; yet so as to transfer from our inward nature a human interest and a semblance of truth sufficient to procure for these shadows of imagination that willing suspension of disbelief for the moment, which constitutes poetic faith... With this view I wrote the Ancient Mariner."
In 1835 Wordsworth told an acquaintance that the poem was based on a strange dream that a friend of Coleridge's (John Cruikshank) had had.
Interestingly, while initially quoted at the time of publication as criticising the poem as "an injury to the volume", decades later Wordsworth claims to have actively collaborated in the writing of the poem and contributed whole stanzas.