Construction of the first church at this site was funded by King Sigismund III Vasa, thankful for winning the Siege of Smolensk, in 1611.
During the Swedish invasion in 1657, the original wooden church was destroyed by allied troops led by George II Rákóczi.
From 1734 to 1735 King Augustus III of Saxony had a box built for him and his wife (the royal couple lived in a palace next door) on the right side of the chancel.
In 1867, in connection with the dissolution of the Order of the Franciscans in the repression following the January Uprising, the church was taken over Diocesan priests.
In subsequent years, the main altar was moved to the wall of the chancel, and choir and sacristy were removed.