The instrument's name comes from the Greek word ophis (ὄφις) "serpent" + kleis (κλείς) "keys", since it was conceived of as a serpent with keys. Like the serpent, some found it difficult to play, and early twentieth-century musicians felt it had a somewhat unpredictable sound.
The ophicleide was invented in 1817 and patented in 1821 by French instrument maker Jean Hilaire Asté (also known as Halary or Haleri) as an extension to the keyed bugle or Royal Kent bugle family. It was the structural cornerstone of the brass section of the Romantic orchestra, often replacing the serpent, a Renaissance instrument which was thought to be outdated.
Its long tubing bends back on itself, and it is played with a cupped mouthpiece similar to modern trombone and euphonium mouthpieces. It originally had nine keys, later expanded to as many as twelve keys, covering the large tone holes. Examples exist in E♭, C, B♭, and A♭ (soprano), F and E♭ (alto or quinticlave), B♭ and C (bass), and F or E♭ (contrabass). The most common members are the bass ophicleides pitched in B♭ or C. Soprano and contrabass instruments are very rare.
Adolphe Sax and the modern maker Robb Stewart have built examples of soprano ophicleides an octave above the bass. Currently, only five contrabass ophicleides are known to exist. Three are in museums, and two are privately owned: one in Cooperstown, New York and one in Petaluma, California. Those in private hands were both made by Robb Stewart and are the only playable examples.
The bass ophicleide was first scored for in the opera Olimpie by Gaspare Spontini in 1819. Other famous works which employ it include Felix Mendelssohn's Elias and Overture to A Midsummer Night's Dream (originally scored for English Bass Horn), as well as Berlioz's Symphonie Fantastique, which was originally scored to include both an ophicleide and a serpent. Today, it is replaced with two tubas but the original effect is lost. The tubas are too loud for the intended sound. 
The instrument was standard in French mid-19th century serious operas by Meyerbeer, Halevy, Saint-Saëns, and Auber, as well as English operas by Michael Balfe, Vincent Wallace, and others. Verdi and Wagner also composed for the ophicleide as did Sir Arthur Sullivan in his Overture Di Ballo (which, like Wagner's Rienzi, also has an additional part for serpent). American composer William Perry (b. 1930) has written a Concerto for Ophicleide and Orchestra for the Australian virtuoso, Nick Byrne. Titled Brass From the Past, it was premiered in 2012 and later recorded by Naxos Records with Byrne as soloist.
The ophicleide (oficleide) was used in Brazilian choro bands well into the 20th century—soloist Irineu de Almeida was the major performer on the instrument—until it was superseded by the saxophone.
The ophicleide was eventually succeeded by the tuba, although it remained popular in Italy until the early twentieth century. The euphonium can also be called a successor instrument. One of the last great ophicleide players was the English musician Sam Hughes. There have been claims that the instrument was a direct ancestor of the saxophone: supposedly Adolphe Sax, while repairing an ophicleide, put a woodwind mouthpiece on the instrument and liked the sound, allegedly leading Sax to design and create a purpose-built instrument. However, this story is not considered plausible, since the developmental history of the saxophone is well documented and the ophicleide and saxophone are only superficially similar to each other in that both have a wide conical bore and large tone holes.
A very loud bass reed organ stop is named after the ophicleide.
The ophicleide, like the keyed bugle (the soprano member of its 'family'), has a fingering system like no other wind instrument. All keys except one are normally closed, opening only when a finger presses the associated key lever. Just below the bell is the largest of the key-covered tone holes, which is normally open, closing only when the lever is pressed. This normally open tone hole is the acoustic bell, with the bell itself having little effect on sound or pitch.
The sound produced with no key levers pressed is the nominal pitch of the instrument. If the player presses the lever for this normally open tone hole, that hole is closed and the now-longer air column extends past this hole up to the bell, lowering the pitch by one half step.
In general, the player can obtain all the "partial" pitches available for a given air column length. To play a higher series of partials, he opens one of the normally closed tone holes, effectively making that hole the "bell" of the instrument, with a corresponding shorter air column and higher series of pitches.
The left hand controls three such tone holes plus the normally open one below the bell. Pitches in the upper and middle range of the instrument can be obtained by using only the left hand's set of tone holes, and the right hand can hold and stabilize the instrument.
At the point where the air column is shortened by opening all of the left hand tone holes, there comes a difficult couple of notes that can best be played by continuing to shorten the air column with two fingers of the right hand, before the series of partials "wraps" and the left hand is used again for another set of notes.
In the lowest octave, some pitches cannot be obtained very well using the holes closer to the bell. For these notes, the other fingers of the right hand can open a few more tone holes that are relatively closer to the mouthpiece than to the bell. Some instruments were made with between one and three extra right hand keys to provide better intonation for specific notes in this register. The right hand keys may also be used in the upper registers as alternate fingerings to facilitate faster passages or to improve intonation.
With the exception of these special few pitches in the low octave, the combinations of partials on various sets of opened tone holes results in the left hand fingers going through something very similar to what they would be doing to manipulate the valves on a modern brass instrument.