Franz Schubert wrote his Piano Quintet in A major, D. 677, popularly known as The Trout, in 1819, when he was only 22 years old. Like a good fraction of his works, however, it was published after his death, in 1829. Schubert didn't employ the traditional quintet lineup (piano + string quartet), opting instead for replacing one violin with a double bass. The composer Johann Nepomuk Hummel had rearranged his own Septet for the same instrumentation, and the Trout was actually written for a group of musicians coming together to play Hummel's work.
The nickname of the piece stems from the fourth movement, which is a set of variations on a lied by Schubert himself, named Die Forelle (the trout). Apparently the patron who commissioned the piece suggested that Schubert includ said set of variations.