In 1890 Niels Ryberg received his M.D. degree from the University of Copenhagen, where he was appointed the professor of anatomy.
His lifelong interest was the effects of light on living organisms. In 1893 he announced that he had prevented suppuration and scarring in smallpox patients by protecting the patients from violet and ultraviolet light. He then experimented with the therapeutic effects of highly concentrated ultraviolet light, noting that it had bactericidal effects.