Wagner's stated intention to write an opera based on the legend of Tristan and Isold, of whom he had read in the thirteenth century narrative poem by Gottfried von Strassburg, first appears in a letter to Franz Liszt of December 16, 1854. The earliest musical sketches date from December 1856, by which date Wagner had already completed the text for Der Ring des Nibelungen, as well as the music for Das Rheingold and Die Walküre, and through Act Two of Siegfried. Wagner had also completed three of his most important writings on the aesthetics of drama.
The composition of Tristan und Isolde is entwined in a nexus of Wagner's personal and theoretical concerns. In August 1857, Wagner stopped work on the music for Siegfried, in order to set to work full time on Tristan because, as stated in his 1860 essay The Music of the Future, he wanted to compose an opera of more modest scale with a chance of being produced. The music-drama was completed in Lucerne in March 1859. Wagner's had also composed five songs to poems by Mathilde Wesendonck, his patron's wife, with whom he had become deeply infatuated, two of which he designated as studies for Tristan und Isolde.
Wagner himself acknowledged that with the composition of Tristan, he transcended the musical and dramaturgical theories he set out in his earlier treatises. Indeed, the musical language of Tristan has long been acknowledged as the beginning of musical modernism. The harmonic language of Tristan, heaving as it does with prolonged courses of unresolved dissonances, not only enacts musically the sexual tension between the opera's two central characters, but also points to the liberation of dissonance from the constraints of tonality that Arnold Schoenberg and others in the twentieth century would champion. The Prelude to Tristan fully exemplifies Wagner's forward-looking approach to both harmony and the issue of musical form -- or, some would say, formlessness -- that operates centrally in his music-dramas. Alfred Lorenz argued in his 1924 study, The Musical Form of Richard Wagner's "Tristan und Isolde", that the opera's prelude and three acts consist of large-scale Bogen ("arch," e.g., ABA; Prelude-Act I, and Act Two) and Bar (e.g., AAB; Act Three) forms, and that the entire opera-prelude and all acts combined falls into a giant Bogen form. In 2000, Robert Bailey argued that the form of the Prelude to Tristan can be understood to unfold in cycles of repeating phrase units. The Prelude also unfolds Wagner's Leitmotif technique, in which instrumental music introduces central motives which correspond with characters and ideas. Wagner seems to have explored the implications of one of Tristan's central Leitmotif -- that consisting of four ascending chromatic pitches and introduced by the oboe in the opening measures of the Prelude -- in his song "Im Treibhaus," which was one of the five Wesendonck songs. Additionally, a strong connection exists between the music of the Act Two love scene of Tristan and that of another study for Tristan, Wagner's earlier Wesendonck song, "Träume."