In connection with the celebrations of the canonization of John of Nepomuk, the construction of a church in Kutná Hora began, which would be dedicated to this new provincial patron. The initiator of the construction was probably the then Archdeacon of Kutná Hora, Václav Erythrei. Apparently at his instigation, the burgher of Kutná Hora and Councilor Josef Khun decided in 1731 to donate land to the town to build the church on which his house stood, but it burned down in 1726 together with other neighboring buildings. The important representative of the Czech radical Baroque, architect Kilián Ignác Dientzenhofer and František Maxmilián Kaňka, worked for the Jesuits of Kutná Hora at that time. The project of F. M. Kaňka was chosen for the construction of the church. The construction was started on the feast of St. Jan Nepomucký on May 16, 1734. Between 1735 and 1739, the construction had to be interrupted due to lack of money, and it was possible to continue it only after a financial loan from the mortuary funds of the Kutná Hora churches. The events of the war and the relocation of Prussian troops in 1745 interrupted the construction again, but the following year a sacristy was built.