The church occupies the site of Monasterium pacis Mariæ, a Carthusian monastery that stood here from 1493 until 1527; the town of Mariefred takes its name from the monastery. The present church was built between 1621 and 1624 over the monastery ruins, but a fire in 1682 badly damaged the stone building. With support from Queen Hedvig Eleonora, it was rebuilt and completed in 1697, when the three vaults of the nave were added and the exterior took the form it retains today, with a polygonal chancel to the east and a pointed tower to the west. A wing with a royal gallery was added on the south side in the 1710s.
Inside, visitors can see a triumphal crucifix carved from limewood, thought to date from around 1500 and possibly originally from Kärnbo church nearby. The church is also known for its textiles, including a fifteenth-century chasuble decorated with embroidery associated with the workshop of Albertus Pictor, and for a chalice said to date from the fourteenth century. The altarpiece was made in 1690 by the sculptor Caspar Schröder of Stockholm, and the pulpit, from 1701, bears Queen Hedvig Eleonora's carved coat of arms. A collection of oil paintings, several attributed to the painter Georg Engelhard Schröder and reportedly brought from Ulriksdal Palace, is also on display.
The church's organ history is of particular interest to enthusiasts. The first organ was built in 1786–87 by Olof Schwan, regarded as Sweden's leading organ builder of his day; his elegant rococo case survives and is considered one of the most valuable in the country, though little of the original pipework remains after rebuildings in 1887 and 1935. The current mechanical organ, installed in 1982 by Mats Arvidsson, was designed to echo the tonal character of Schwan's instruments.