Art buffs of a queasy disposition may not wish to look too closely at a newly identified portrait discovered in a private English collection. It is a masterpiece of elegance and detail dating from 1800 but some may wish the artist had been just a little hazier about the contents of the giant glass jar on the subject's desk.

The horror in the jar helped identify the rare portrait by the French artist Pierre Chasselat. It is the 32lb (15kg) testicular tumour that the distinguished surgeon Ange-Bernard Imbert Delonnes cut from Napoleon's foreign minister Charles-François Delacroix – against the advice of eight other surgeons who were convinced the operation would kill the patient.

Simon Chaplin, director of the library, said: "Like a general surrounded by the trophies of battle, the depiction of Imbert Delonnes reminds us of an age when every operation was an ordeal for the patient, and every success a triumph for the surgeon."

Imbert Delonnes, whose surgery was considered recklessly brave by many of his contemporaries, was immensely proud of his success, and kept the tumour in a massive glass jar as a trophy. He probably commissioned the drawing himself to celebrate his achievements, boasting equally of his learning and his elegant office and handsome library equipped with a full size marble statue of Aesculapius.

The portrait has just been acquired for £28,000 by the Wellcome Library for the History of Medicine. "Delacroix was very doubtful about the operation, but Imbert Delonnes gave him his own tract on his earlier surgery to read, and eventually he agreed," said William Shupbach, librarian at the Wellcome Trust.

The operation took 2.5 hours, with only alcohol and opium as anaesthetics. Delacroix survived to become ambassador to the Netherlands – something he could never have achieved while incapacitated by the growth, which meant he had to be carried everywhere on a stretcher.

He claimed that the renowned artist Eugène Delacroix, born in 1798, was his biological son – something that Shupbach thinks very unlikely given the nature of the tumour. The tricky and dangerous diplomat Charles Talleyrand was said to be the artist's real father.

The oval portrait propped in the corner is of another of his patients, Perier de Gurat, mayor of Angoulême. The mayor survived an operation in which the surgeon chopped off his huge facial tumour and rebuilt his nose.

Mark Fecker of the French-based art dealers Didier Aaron acquired the drawing as a "portrait of an unknown man". Recognising that the subject must be a surgeon, Fecker went to the Wellcome Trust to research the drawing. Eventually he identified the sitter as the surgeon Imbert Delonnes from the writing on the sheet before him, which comes from his book Progress of the Art of Healing.

The library bought the drawing with the help of grants from the Art Fund charity and the Museums Libraries and Archives purchase fund.