We present the first integrated study of carbonate, hydroxyl, fluoride, and chloride ion partitioning in the apatite-melt system. We determined volatile partitioning behavior between apatite and silicate melt for both haplobasaltic andesite and trachyte bulk compositions at 0.5–1 GPa and 1250°C using the piston-cylinder apparatus. All volatile species were analyzed directly in both apatite and glass using secondary ion mass spectrometry (SIMS) and electron probe microanalysis. Distribution coefficients for OH-halogen exchange are similar to those from previous studies, and together with literature data, reveal a significant log-linear relationship with temperature, while the effects of pressure and melt composition are minimal. Meanwhile, halogen-free experiments generate very high C contents (up to 5000 ppm) in apatite. Stoichiometry calculations and infrared spectra indicate that this C is mainly incorporated onto the channel volatile site together with hydroxyl. In halogen-bearing experiments, apatite crystals contain significantly lower C (≤500 ppm), which may be partly incorporated onto the phosphate site while the channel volatile site is filled by OH+F+Cl+C. Our experiments give the first constraints on H2O-CO2 exchange between apatite and silicate melt, with a KD of 0.355 ± 0.05 for the trachyte and 0.629 ± 0.08 for the haplobasaltic andesite. The new constraints on the temperature-dependence of partitioning will enable quantitative modeling of apatite-volatile exchange in igneous systems, while this new partitioning data and method for direct, in situ analysis of C in apatite mark a significant advance that will permit future studies of magmatic C and other volatiles. This has a broad range of potential applications including magmatic differentiation, fractionation, and degassing; quantification of volatile budgets in extraterrestrial and deep earth environments; and mineralization processes.