From 1792 he spent some years on the west coast of Africa, and in 1797-1798 acted as secretary of the Swedish embassy in London. He was elected Fellow of the Royal Society on 19 April 1798. Returning to Sweden, he again took up his position as botanices demonstrator at Uppsala, and was in 1802 elected president of the "Zoophytolithic Society" (later called the Linnaean Institute). In 1812, he became professor of materia medica at the university. He died in Uppsala in 1837. In addition to various botanical writings, he published the autobiography of Carolus Linnaeus in 1823.
His brother, Johan Afzelius (1753–1837) was professor of chemistry at Uppsala; and another brother, Pehr von Afzelius (1760–1843; the "von" was added when he was ennobled), who became professor of medicine at Uppsala in 1801, was distinguished as a medical teacher and practitioner.