Born in Königsberg, Haffner attended the Collegium Fridericianum. Already at the age of 16 he joined a travelling troupe and as a travelling comedian he passed through Prussia, Saxony, Silesia, Austria and Hungary. After ten years he became a dramatist and playwright at the Pest Theater with Feodor Grimm, after he had already made some dramatic attempts before.
In Pest he wrote tragedies like The robbery shooters, The curl of the decapitated, Blocks of the grave, Schwarzenberg and Palffy and Batorys Tod, which received the stormy applause of the audience. The well-known theatre director Carl Carl in Vienna strangely recognized Haffner's talent for the local posse in this work and engaged him for nine years for the Theater an der Wien as a theatre poet. Haffner had to commit himself to the delivery of eleven plays per year and he kept this contract. Later he turned to the Theater in der Josefstadt and edited the satirical weekly Böse Zungen.
Haffner achieved his first major success with the romantic-comical folk tale Das Marmor-Herz, which won a second prize in 1841 and was premiered on 21 April that year at the Theater an der Wien. Permanently his three-act genre picture Therese Krones has been preserved, in which he brought the Raimund circle onto the stage. Besides dramas Haffner also wrote more than 30 volumes of novels. One of them, Scholz and Nestroy (1864 to 1866, 3 volumes), contains various things about the history of his life.
Together with Richard Genée he wrote the libretto of the Operetta Die Fledermaus (music: Johann Strauss II)
Critics have treated Haffner with little encouragement and leniency, although humour and skilful character drawing cannot be denied in his plays.
Haffner, during his last years of life incapable of working due to illness and pensioner of the Presseclub Concordia [de], left a large family in misery and distress; he was buried in the Wiener Zentralfriedhof (3-4-41) in a dedicated grave of the city of Vienna. In 1955, in Vienna Donaustadt (22nd district of Vienna), the Haffnergasse was named after him.