The church was built in place of an earlier wooden church from 1280. Construction work in the brick Gothic style began in 1346 with the choir. Originally the church was supposed to have the form of a pseudo-basilica, but in 1367 this concept was adapted to a hall church. In 1381 the construction was completed with the roof and the glass windows. The tower was built from 1420 and received a clock in 1425. The vaults were completed in 1442. The tower collapsed due to the lightning strike in 1480 and had to be rebuilt, and the Great Northern War in 1520 also caused major damage. In 1536 the tower was raised. The church at that time has many features that indicate a connection with the church of St. Bartholomaei in Demmin in Pomerania.
In 1500 Bishop Lucas Watzenrode added a gallery to the left of the choir. The tombstone of Bishop Paul von Legendorf († 1467) was financed by Bishop Lucas Watzenrode in 1494: After the war damage, Bishop Legendorf's grave was secured by the Museum of Warmia and Masuria in Olsztyn and, after conservation, found a worthy place in Heilsberg Castle .
In the Chapel of the Last Supper there was a late Gothic polyptych in the style of the Antwerp altars. In the Chapel of Our Lady there was a painted triptych from 1485. In the 17th century the church was equipped with the main altar and choir stalls.
The church was rebuilt between 1855 and 1859 in the neo-Gothic style. At the beginning of 1945, the Gothic church tower was blown up by the German army, destroying most of the church and its vaults. Only the south side and the northern part survived, the eastern choir and nine of the ten columns. The church remained in ruins until 1979. Reconstruction began under the new pastor Tadeusz Brandys. The first service was held here by Brandys in 1981 during martial law. The church was consecrated in 1986. In 2001, the church was elevated to the rank of a minor basilica by Pope John Paul II (Wikipedia).