The painting is one of the earliest works of the Italian Renaissance painter Piero della Francesca, who was born in the town.
In 1445, the Compagnia della Misericordia, a confraternity of Borgo San Sepolcro, commissioned Piero, a native of the town, to paint a polyptych for them.
St Sebastian's panel shows a close connection with Masaccio's nudes, which Piero would have seen in an early visit to Florence.
The last part of the polyptych to be painted was the main central panel showing the Madonna della Misericordia.
Piero resolves the difficulty of dealing with a flat solid gilded background, requested by the patrons, by placing the kneeling members of the confraternity (who commissioned the altarpiece) in the realistic three-dimensional space created by the Madonna's mantle, a space resembling the apse of a church.