The cusp–core problem is a controversial problem in galactic dark matter haloes. Cosmological N-body simulations have demonstrated that galactic dark matter haloes have a cuspy density profile at the centre. However, baryonic physics may affect the dark matter density profile. For example, it was suggested that adiabatic contraction of baryonic gas makes the dark matter cusp steeper. However, it is still an open question as to whether the gas falls into the galactic centre in a smooth adiabatic manner. Recent numerical studies suggested that disc galaxies might experience a clumpy phase in the early stage of disc formation, which could also explain the clump clusters and chain galaxies observed in the high-redshift Universe. In this paper, using numerical simulations with an isolated model, we study how the dark matter halo responds to the clumpy nature of baryon components in disc galaxy formation through the clump-cluster phase. Our simulation demonstrates that such a clumpy phase leads to a shallower density profile of the dark matter halo in the central region while clumps fall into the centre due to dynamical friction. This mechanism helps to make the central dark matter density profile shallower in galaxies with virial mass as large as 5.0 × 1011 M⊙. The halo draws the clumps into the galactic centre, while it is kinematically heated by the clumps. We additionally run a dark-matter-only simulation excluding baryonic components and confirm that the resultant shallower density profile is not due to a numerical artefact in the simulation, such as two-body relaxation.