The parish is first mentioned in records in 1314, with the church itself noted in either 1322 or 1323 depending on the source, and a bishop's visitation is recorded for 1339. The first church on the site was probably built of timber before being replaced by a stone structure around the mid-14th century. Local tradition credits the noble Fleming family of Norrnäs, who held patronage rights until 1922, with sponsoring the church's construction. The building has sometimes been nicknamed the "Cathedral of the Archipelago" on account of its scale and importance in the region.
The church was enlarged during the 15th and 17th centuries, when side chapels were added and used as burial vaults, one for the Bagge family of Boo and Siggesta together with Olof Bure and his family, the other for the Fleming family. Built on clay soil, the church has suffered stability problems over the centuries, resulting in an unusual and irregular plan in which the long axis of the nave is difficult to make out. Three substantial buttresses, two arched and one solid, support the south gable against collapse. Near the south-west corner stands one of the few surviving bone houses (ossuaries) in Sweden. As with many medieval Swedish churches built under the rules of the Uppland church law of 1296, it has no tower; instead a free-standing bell tower, completed in 1809, stands beside the church, the third such structure on this spot.
Among the church's most treasured furnishings is a triumphal crucifix from the early 14th century, thought to have been made for the original timber church. The richly carved altarpiece from around 1480 is attributed to German sculptors, with its painted panels linked to the workshop of the Lübeck artist Bernt Notke. A cabinet shrine of about 1514, made by the joiner Lars, depicts the church's patron saint, King Olof. There is also a standing figure of St Birgitta from around 1520, attributed to the so-called Immaculata Master, an "Anna själv tredje" group showing St Anne with Mary on her knee (the figure of the infant Christ that once sat on the other knee has been lost), and a 15th-century figure of St Bartholomew. The elaborately carved pulpit of 1658, a gift from Göran Fleming, is attributed to the Lübeck craftsman Hans Hebel.
The present organ was built in 1860 by Johan Niklas Söderling of Gothenburg, replacing two earlier instruments recorded in the church since the 17th century. It was enlarged in 1945 and later renovated in 1975, and is considered one of relatively few surviving Söderling organs in Sweden.
A short film, Julotta, was reportedly filmed in the church in 1937.