The pope, born Giovanni Battista Pamphilj, was initially wary of having his portrait taken by Velázquez, but relented after he was given reproductions of examples of Velázquez's portraiture. A contributing factor for this large advancement in the painter's career was that he had already depicted a number of members of Pamphilj's inner court. Yet the pope remained wary and cautious, and the painting was initially displayed to only his immediate family, and was largely lost from public view through the 17th and 18th centuries. The parchment held by the pope contains Velázquez's signature.
The portrait was painted during Velázquez's second voyage to Italy, between 1649 and 1651. The Pope's vestments being of light linen, it was probably painted during the summer, most likely in 1650. Velázquez included his signature on the paper the Pope is holding, but it is difficult to read the date. There are two versions of the story of how Velázquez came to paint the portrait. According to one of them, while visiting the Vatican City, Velázquez, already a renowned painter, was granted an audience with Pope Innocent X. He offered to paint a portrait of the Pope, but Innocent X doubted, mistrusting Velázquez's fame. Hence, he asked Veláquez to offer some proof of his painting skills. It would have been then that Velázquez painted the portrait of his servant Juan de Pareja (today at display in the Metropolitan Museum of New York). Once the Pope saw the portrait of Juan de Pareja, he allowed Velázquez to paint the portrait.
Apparently, when the Pope saw the finished portrait, he exclaimed, somewhat disconcerted: "Troppo vero!" ("all too true!"), though he was not able to deny the intrinsic quality of the portrait as a masterpiece. Experts doubt the veracity of this story, and argue that the Pope allowed Velázquez to paint him because he had already painted with great success other people from the inner papal court, including the Pope's own barber.
The portrait was kept at private display by Innocent's family, the Pamphilj, who would display it in the Doria-Pamphilj gallery where it remains to this day. It was a relatively secret masterpiece for much of the 17th and 18th centuries, only known to some connoisseurs who, nonetheless, would inevitably praise the work as one of the finest portraits ever produced. French historian Hippolyte Taine considered the portrait as "the masterpiece amongst all portraits" and said that "once it has been seen, it is impossible to forget".