We present new results of the experimental study of the residual activity induced by high-energy heavy ions in carbon-based materials: graphite and carbon composite. The graphite target was irradiated by 500 MeV/u tantalum ions and the carbon composite target was irradiated by 500 MeV/u uranium ions. The targets were assembled from a stack of thin plates and after irradiation were investigated using gamma-ray spectroscopy. Main tasks of the experimental study were: 1) to identify induced radioactive isotopes in the gamma spectra of the measured samples, 2) to estimate residual activity of the identified isotopes and 3) to determine depth profiles of the residual activity of individual isotopes. Depth profiling of the residual activity of all identified isotopes was performed by measurements of individual target plates. According to the depth profiles, the identified isotopes can be classified into two main groups: target-nuclei fragments and projectile fragments. In the measured gamma spectra of the carbon-based materials irradiated by heavy ions only one target-nuclei fragment, 7 Be, was identified. All the rest of the isotopes detected using gamma-ray spectroscopy, are the projectile fragments of various masses. The experimental data were compared with Monte Carlo simulations performed by FLUKA code in order to verify validity of physical models and data libraries implemented in the code. A satisfactory agreement between the experiment and the simulations was observed.