The study of chemical compounds produced by living organisms, including their isolation and synthesis.