The Miracle of the Transplantation of the Black Leg is described by Jacobus de Voragine, Legenda aurea, 1275, translated into English by William Caxton, 1483, vol. 5, edited by F.S. Ellis, Temple Classics 1900, as follows: "Felix, the eighth pope after S. Gregory, did do make a noble church at Rome of the saints Cosmo and Damian, and there was a man which served devoutly the holy martyrs in that church, who a canker had consumed all his thigh. And as he slept, the holy martyrs Cosmo and Damian, appeared to him their devout servant, bringing with them an instrument and ointment of whom that one said to that other: Where shall we have flesh when we have cut away the rotten flesh to fill the void place? Then that other said to him: There is an Ethiopian that this day is buried in the churchyard of S. Peter ad Vincula, which is yet fresh, let us bear this thither, and take we out of that morian's flesh and fill this place withal. And so they fetched the thigh of the sick man and so changed that one for that other. And when the sick man awoke and felt no pain, he put forth his hand and felt his leg without hurt, and then took a candle, and saw well that it was not his thigh, but that it was another. And when he was well come to himself, he sprang out of his bed for joy, and recounted to all the people how it was happed to him, and that which he had seen in his sleep, and how he was healed. And they sent hastily to the tomb of the dead man, and found the thigh of him cut off, and that other thigh in the tomb instead of his. Then let us pray unto these holy martyrs to be our succour and help in all our hurts, blechures and sores, and that by their merits after this life we may come to everlasting bliss in heaven. Amen."

source: http://catalogue.wellcomelibrary.org/record=b1203821

Saints Cosmas and Damian 
miraculously transplant the (black) leg 
of a Moor onto the (white) body of Justinian.
Ditzingen, 16th century. 
Source: Wikipedia

"In the sixteenth century the black corpse would occasionaly be replaced by a living black person placed in the foreground. This disturbing visual addition is unique to Spanish representations of the miracle in early modern Europe. In some examples, as in the painting in the Cathedral of Palencia, it is no clear whether the black amputee who faces the viewer in the foreground is alive or dead."

Picturing the Social Margins.
Edited by Tom Nichols.

Isidro de Villoldo, c.1539, The Miracle of the Black Leg,
Museo Nacional de Escultura de Valladolid, Spain.
Source: http://www.bbk.ac.uk/brakc/events.html

Other representations:

Source: bridgeman

Credit: Ms 450 fol.1 Miracle of the Black Leg (vellum), Cremona,
Girolamo da (fl.1451-83) (attr. to) / Society of Antiquaries of London, UK
/ The Bridgeman Art Library

Credit: 126-0035321 SS. Cosmas and Damian graft the leg of an Ethiopian man
onto the stump of deacon Justinian;, Huguet, Jaume (1415-92) / Santa Maria
of Egara in Terrassa, Barcelona, Spain / Index / The Bridgeman Art Library

Credit: The Miracle of the Deacon Justinian,
from the predella of the San Marco altarpiece, 1440
(tempera on panel), Angelico, Fra (Guido di Pietro)
(c.1387-1455) / Museo di San Marco dell'Angelico,
Florence, Italy / The Bridgeman Art Library

Credit: Miracle of the Black Leg (oil on panel), Berruguete, 
Pedro (c.1450-1504) / Museo Colegiata San Cosme y San Damian, 
Covarrubias, Spain / The Bridgeman Art Library

Credit: The Charity of St. Cosmas and St. Damian,
showing scenes of medical treatment and the miracle
of grafting the leg of an Ethiopian man onto the stump
of the deacon, Justinian (oil on panel), Francken, Frans
the Elder (1542-1616) / Koninklijk Museum voor Schone Kunsten,
Antwerp, Belgium / The Bridgeman Art Library