After the United States declared war on Germany in April 1917, Heidelberger was commissioned in the Sanitary Corps and assigned to the Rockefeller Institute.
During this time Heidelberger was approached by the bacteriologist Oswald Avery to help him elucidate the chemistry of the "specific soluble substance" Avery and Alphonse R. Dochez had found in the spherical capsule that envelops pneumococcus and many other species of bacteria.