In this paper, we study how the dark matter density profiles of dwarf galaxies in the mass range 108–1010 M⊙ are modified by the interaction of the dwarf galaxy with neighbouring structures, and by the changing baryon fraction in dwarf galaxies. With this aim, and referring to an earlier paper by Del Popolo, we determine the density profiles of the dwarf galaxies, taking into account the effect of tidal interaction with neighbouring structures, the effects of ordered and random angular momentum, dynamical friction, the response of dark matter haloes to the condensation of baryons and the effects produced by the presence of baryons. As already shown in the earlier paper, the slope of the density profile of inner haloes flattens with decreasing halo mass, and the profile is well approximated by a Burkert profile. We thus treat the angular momentum generated by tidal torques and the baryon fraction as a parameter in order to understand how the latter influences the density profiles. The analysis shows that dwarf galaxies that have suffered a smaller tidal torque (and consequently have smaller angular momentum) are characterized by steeper profiles with respect to dwarf galaxies subject to higher torque. Similarly, dwarf galaxies that have a smaller baryon fraction also have steeper profiles than those that have a larger baryon fraction. When tidal torquing is shut down and baryons are not present, the density profile is very well approximated by an Einasto profile, similarly to dwarf galaxies obtained in dissipationless N‐body simulations. Then, we apply the result of the previous analysis to the dark matter halo rotation curves of three different dwarfs: NGC 2976, which is known to have a flat inner core; NGC 5949, which has a profile intermediate between a cored and a cuspy one; and NGC 5963, which has a cuspy profile. After calculating the baryon fraction, which is ≃0.1 for the three galaxies, we fitted the rotation curves, changing the value of the angular momentum. NGC 2976 has a higher value of ordered angular momentum (λ≃ 0.04) than NGC 5949 (λ≃ 0.025). For NGC 5963, a very steep profile can be obtained with a low value of λ (λ≃ 0.02) and also by decreasing the value of the random angular momentum. For NGC 2976, the tidal interaction with M81 could also have influenced the inner part of the density profile. Finally, we show how the inner density profile correlates with the tidal index for dwarf and low surface brightness galaxies given by Karachentsev et al.