During the formation of terrestrial planets, volatile loss may occur through nebular processing, planetesimal differentiation, and planetary accretion. We investigate iron meteorites as an archive of volatile loss during planetesimal processing. The carbon contents of the parent bodies of magmatic iron meteorites are reconstructed by thermodynamic modeling. Calculated solid/molten alloy partitioning of C increases greatly with liquid S concentration, and inferred parent body C concentrations range from 0.0004 to 0.11 wt%. Parent bodies fall into two compositional clusters characterized by cores with medium and low C/S. Both of these require significant planetesimal degassing, as metamorphic devolatilization on chondrite-like precursors is insufficient to account for their C depletions. Planetesimal core formation models, ranging from closed-system extraction to degassing of a wholly molten body, show that significant open-system silicate melting and volatile loss are required to match medium and low C/S parent body core compositions. Greater depletion in C relative to S is the hallmark of silicate degassing, indicating that parent body core compositions record processes that affect composite silicate/iron planetesimals. Degassing of bare cores stripped of their silicate mantles would deplete S with negligible C loss and could not account for inferred parent body core compositions. Devolatilization during small-body differentiation is thus a key process in shaping the volatile inventory of terrestrial planets derived from planetesimals and planetary embryos.