The first mention of the temple on Mount Ślęża dates back to the 12th century. At that time, the Silesian magnate, palatine Piotr Włostowic brought the Augustinian order to Ślęża, giving them the mountain and funding the construction of a temple and a monastery on it.
In the second half of the 16th century, the Augustinians erected a wooden chapel on the ruins of an earlier medieval castle, which was part of a double ring of defensive castles built by Bolko II. In the years 1698-1702, a brick chapel was erected in its place. In 1822, an observation gallery was added.
On the night of June 4/5, 1834, the temple burned down in a fire caused by a lightning strike. Reconstruction began in the years 1851-1852 thanks to Fr. Cardinal Melchior von Diepenbrock. The design of the new church was made by Antoni Gericke. It has preserved the neo-Romanesque appearance of the temple with a hall interior, a wooden ceiling and a square turret. To a large extent, the building material for the new temple were old walls and stone elements preserved from the fire. On August 15, 1852, the church was consecrated, and Pope Pius IX gave it a painting of the Virgin Mary.
After World War II, the church again fell into disrepair. Further renovations were carried out in 1967 (thanks to the efforts of Bishop Rector Paweł Latusek) and in 2000. In the years 2004-2006, archaeological work was carried out under the temple, which resulted in the closure of the temple and thus its subsequent devastation.