In 1827, he took the position as assistant teacher in Stavanger, where he met, and later married, Bertha Cecilie Gjesdal.
Krøyer returned to Copenhagen in 1830 where he was employed as a teacher in natural history at the Military Academy.
As the course lacked a textbook, Krøyer wrote and published Grundtræk til Vejledning ved naturhistorisk Undervisning (1833).
Krøyer also founded the journal Naturhistorisk tidsskrift, for which he served as editor and to which he contributed numerous articles.
But his health eventually deteriorated and in 1869 he had to take his leave of his position of head of the Natural Museum of Copenhagen which he had held since 1847.