The trace SO2 in the atmosphere can cause serious degradation in performance of proton exchange membrane fuel cells. To mitigate this problem, calcium oxide/carbon foam composites were designed and fabricated via a facile one-pot method using phenol formaldehyde resin as the carbon precursor, with polyurethane foam as the template and nano-sized CaCO3 as the precursor of CaO. The composite shows a promising retention capacity for trace SO2 and enhanced cycle stability due to the combined effect of well-distributed CaO particles, the hierarchical porous structure and the anchoring effect of the carbon foam matrix. It has been demonstrated that the as-made composite is a promising adsorbent for the efficient removal of the trace SO2 from air, suggesting this composite can be a potential candidate for desulfurization of the air entering proton exchange membrane fuel cells.