Like many of Ibsen's better-known plays, Ghosts is a scathing commentary on 19th century morality.
Ghosts was written during the autumn of 1881 and was published in December of the same year. It was not performed in the theatre till May 1882, when a Danish touring company produced it in the Aurora Turner Hall in Chicago. Ibsen disliked the translator William Archer's use of the word 'Ghosts' as the play's title, whereas the Norwegian "Gengangere" would be more accurately translated as "The Revenants", which literally means "The Ones who Return".
The play achieved a single private London performance on 13 March 1891 at the Royalty Theatre. The Lord Chamberlain's Office censorship was avoided by the formation of a subscription-only Theatre Society, which included Thomas Hardy and Henry James among its members.
Helene Alving is about to dedicate an orphanage she has built in the memory of her dead husband, Captain Alving. She reveals to her spiritual advisor, Pastor Manders, that she has hidden the evils of her marriage, and has built the orphanage to deplete her husband's wealth so that their son, Osvald, might not inherit anything from him. Pastor Manders had previously advised her to return to her husband despite his philandering, and she followed his advice in the belief that her love for her husband would eventually reform him. However her husband's philandering continued until his death, and Mrs. Alving was unable to leave him prior for fear of being shunned by the community. During the action of the play she discovers that her son Osvald (whom she had sent away so that he would not be corrupted by his father) is suffering from congenital syphilis, and (worse) has fallen in love with Regina Engstrand, Mrs. Alving's maid, who is revealed to be an illegitimate daughter of Captain Alving, and thereby Osvald's own half-sister.
The play concludes with Mrs. Alving deciding whether or not to euthanize her son Osvald in his developing syphillitic madness in accordance with his wishes.
Much like A Doll's House, Ghosts was deliberately sensational. What most offended Ibsen's contemporaries was what they regarded as its shocking indecency, its more than frank treatment of a forbidden topic. An English critic was later to describe it as "a dirty deed done in public," and to many it must have seemed simply shocking rather than in any profound intellectual sense revolutionary.
At the time, the mere mention of venereal disease was scandalous, but to show that even a person who followed society's ideals of morality had no protection against it was beyond the pale. Mrs. Alving's is not the noble life which Victorians believed would result from fulfilling one's duty rather than following one's desires. Those idealized beliefs are only the "ghosts" of the past, haunting the present.
The production of Ghosts scandalised Norwegian society of the day and Ibsen was strongly criticised. In 1898 when Ibsen was presented to King Oscar II of Sweden, at a dinner in Ibsen's honour, the King told Ibsen that Ghosts was not a good play. After a pause, Ibsen exploded "Your Majesty, I had to write Ghosts!"