The chapel is located in the church of San Luigi dei Francesi, and had been purchased by the French cardinal Mathieu Cointrel (whose name was later italianized into Matteo Contarelli) in 1565. His intention was to decorate it with stories dedicated to Saint Matthew, whose name he bore. The iconographic plan was defined by himself: at the center there had to be the altarpiece with the effigy of the saint and at the two sides the images with the saint’s vocation and his martyrdom. The work was entrusted to a Brescian painter named Girolamo Muziano, who in twenty years did not realize anything. In 1585 the cardinal died and his heirs decided to turn to others. In 1587 they commissioned a Flemish sculptor named Jacob Cobaert to create a sculptural group, which he actually delivered fifteen years later, but the group did not meet the favor of the clients. In 1591, the heirs of the cardinal decided to ask Cavalier d’Arpino for the pictorial decoration of the chapel, but the latter, in about two years, realized only the fresco of the small vault. So, at the approach of the Holy Year of 1600, the chapel was still unadorned and the heirs of Contarelli, thanks to the urging of Cardinal Del Monte, new protector of Caravaggio, decided to turn to the painter of Lombard origin to decorate the chapel. And in fact, Caravaggio, in less than two years, delivered the two canvases depicting the "vocation of St. Matthew" and the "martyrdom of St. Matthew".
Two years later, in 1602, the sculptural group of Jacob Cobaert was also delivered, but after a few months it was removed. The commissioners turned again to Caravaggio, who made a canvas in which St. Matthew was depicted with an open book resting on his legs, and an angel at his side directing his hand to write on the book. Shortly after this canvas was removed, because it was not appreciated (it ended up in Berlin where it was destroyed during the Second World War), and in its place Caravaggio made a second version, which is the one that is still in the Chapel.