Melartin was born in Kärkölä, and studied at the Porvoo and Turku Academy. He was a lecturer at the Vyborg High School between 1805 and 1810 and the leader of the Old Finnish School between 1810 and 1814. In 1812 he received the post of professor of theology at the Imperial Academy of Turku and from 1828 he was a professor of dogmatics. In 1833 he was elected Archbishop of Turku. He died in Turku, aged 67.
Melartin was a member of two school committees operating in the 1810s and 1830s. As a member of the Committee, he proposed, inter alia, the separation of the Church and the School, but the proposal was not implemented. Melartin was also a member of a committee that prepared the 1843 school system. Melartin was also one of the founders of the Finnish Literature Track and was its first superior between 1831 and 1833.