We introduce the notion of rigidity for harmonic-Ricci solitons and provide some characterizations of rigidity, generalizing known results for Ricci solitons. In the complete case we restrict to steady and shrinking gradient solitons, while in the compact case we treat general solitons without further assumptions. We show that the rigidity can be traced back to the vanishing of certain modified curvature tensors that take into account the geometry of a Riemannian manifold equipped with a smooth map φ, called φ-curvature, which is a natural generalization in the setting of harmonic-Ricci solitons of the standard curvature tensor.