The chapel was erected by order of the queen Sofia Holszańska, the fourth wife of Władysław Jagiełło, as her burial chapel. At the beginning of 20th century the chapel was painted by Włodzimierz Tetmajer. The artist presented the queen Sofia twice, first getting married with Władysław Jagiełło, second, as a widow, together with her sons Władysław of Warna and Casimir Jagiellon. Besides, the artist painted Virgin Mary four times, as Mary of Częstochowa, Mary of Vilnius, Mary of Berdyczów and Mary of Kalwaria Zebrzydowska. On the vault Tetmajer painted Polish heroes, saints and people of culture. On the vault he painted Polish saints, kings, heroes and artists. We can see: Tadeusz Kościuszko, Jan Matejko, Adam Mickiewicz, saint Stanisław, Nicolaus Copernicus, Piotr Skarga, and almost all the kings.