The use of carbon ion therapy for cancer treatment is becoming more widespread due to the advantages of carbon ions compared with X‑rays. Breast cancer patients may benefit from these advantages, as the surrounding healthy tissues receive a lower dose, and the increased biological effectiveness of carbon ions can better control radioresistant cancer cells. Accumulating evidence indicates that the Hedgehog (Hh) pathway is linked to the development and progression of breast cancer, as well as to resistance to X‑irradiation and the migratory capacity of cancer cells. Hence, there is an increasing interest in targeting the Hh pathway in combination with radiotherapy. Several studies have already investigated this treatment strategy with conventional radiotherapy. However, to the best of our knowledge, the combination of Hh inhibitors with particle therapy has not yet been explored. The aim of the present study was to investigate the potential of the Hh inhibitor GANT61 as an effective modulator of radiosensitivity and migration potential in MCF‑7 breast cancer cells, and compare potential differences between carbon ion irradiation and X‑ray exposure. Although Hh targeting was not able to radiosensitise cells to any radiation type used, the combination of GANT61 with X‑rays or carbon ions (energy: 95 MeV/n; linear energy transfer: 73 keV/μm) was more effective in decreasing MCF‑7 cell migration compared with either radiation type alone. Gene expression of the Hh pathway was affected to different degrees in response to X‑ray and carbon ion irradiation, as well as in response to the combination of GANT61 with irradiation. In conclusion, combining Hh inhibition with radiation (X‑rays or carbon ions) more effectively decreased breast cancer cell migration compared with radiation treatment alone.