He attended Uppsala University where he first studied classical literature followed by theology. In 1786, at the age of 20, Rosenstein defended his PhD. He was ordained a priest in 1791 after becoming master of primus and associate professor of theology in 1790.