The first written mention of Hejnice dates from 1381, although local legend places the origins of the pilgrimage site in the 13th century, when a miraculous healing was said to have occurred after a statue of the Virgin Mary had been brought here. The site gradually developed into a place of pilgrimage, where a church was later built and repeatedly expanded.
After the Thirty Years’ War, the town experienced its greatest period of prosperity, accompanied by the reconstruction of the church and the construction of a Franciscan monastery initiated by the Gallas family. The Baroque rebuilding in the first half of the 18th century gave the complex its present character. The church and monastery were partially damaged by fire in 1761 and fully restored only at the beginning of the 20th century.
During the 19th century, industrial factories were established in the town, along with a school and, from 1900, a railway connection. The settlement was granted town status in 1917. After the Second World War, the population declined significantly. In 1950, the monastery was turned into an internment camp for members of religious orders. Following restoration after 1989, it was reopened in 2001 as the International Centre for Spiritual Renewal.
Among the protected monuments in Hejnice are the basilica and monastery, Baroque roadside shrines, and the historic bridge near the church. The Hejnice Festival is held annually at the beginning of summer.