The unique decoration of the Sacristy of San Marco, executed by Melozzo da Forlì together with his assistant Marco Palmezzano between 1477 and 1493 in the Basilica of Santa Casa in Loreto, is an outstanding example of illusionistic Quattrocento painting. The article analyzes the structure of the architectural work, into which the real interior of the sacristy was transformed, by means of perspective and of painting, and suggests an approach to a reconstruction of the perception of this ensemble by Melozzo’s contemporaries. The connection of the artistic solution of the sacristy of San Marco with the Florentine architecture of the 15th is traced, including how the forms of the lantern of the Florentine Cathedral of Santa Maria del Fiore were repeated in the octagon painted on the vault of the sacristy.