The manager of the theatre, An der Wien, had, before this, made overtures to Beethoven to write an opera, and he went so far as to take up his quarters in the theatre, preparatory to this work; but a change in the management made it necessary to give up the idea for the time being. In 1804, the offer in regard to the opera was renewed, and work was begun upon it. It took up a large part of his time until its production in November of 1805. It is probable that he took more pains with this work than was devoted to any other of his compositions with the exception of the Mass in D. His capacity for work was extraordinary, particularly at this time, and the delight that he experienced in producing these masterpieces was still new to him, which in itself was an incentive to great exertion. His approaching deafness also had a good deal to do with his great activity. The ailment had progressed steadily from the time of its first appearance; at the time of which we write he had abandoned all hope of any aid from medical treatment; by throwing himself heart and soul into his work, he could forget for the time the misfortune which was closing in on him. He feared that a period of absolute deafness might set in when he would be unable to hear any of his works, and the desire must have been great to accomplish as much as possible before that time should come.
Beethoven does not seem to have been very hard to suit in the way of a libretto at this time. He probably gave the matter very little consideration except on one point,—its morality. His high ideals, and his innate purity of mind, caused him to dislike and condemn the sort of story which was usually worked up into operatic libretti in those days, in which intrigue and illicit love formed the staple material. He expressed himself strongly on this subject, even criticising Mozart for having set Don Giovanni to music, saying that it degraded the art. So strongly did he feel about it that he seems to have thought almost any libretto would do, provided the moral sentiment contained in it were sufficiently prominent. Later, the experience which he gained with Fidelio showed him that the libretto of an opera is indeed a very important matter; then he went to the other extreme, and was unable to find anything which would satisfy him, although many libretti were submitted to him at various times during the remainder of his life. A quantity of them were found among his papers after his death. Bouilly’s libretto Leonore, which had been set to music by two different composers before Beethoven took it in hand, was finally selected, and Sonnleithner was employed to translate it from the French. The name of the opera was changed to Fidelio, but the various overtures written for it are still known as the Leonore overtures.