ABSTRACT Our understanding of how active galactic nucleus feedback operates in galaxy clusters has improved in recent years owing to large efforts in multiwavelength observations and hydrodynamical simulations. However, it is much less clear how feedback operates in galaxy groups, which have shallower gravitational potentials. In this work, using very deep Very Large Array and new MeerKAT observations from the MIGHTEE survey, we compiled a sample of 247 X-ray selected galaxy groups detected in the COSMOS field. We have studied the relation between the X-ray emission of the intra-group medium and the 1.4 GHz radio emission of the central radio galaxy. For comparison, we have also built a control sample of 142 galaxy clusters using ROSAT and NVSS data. We find that clusters and groups follow the same correlation between X-ray and radio emission. Large radio galaxies hosted in the centres of groups and merging clusters increase the scatter of the distribution. Using statistical tests and Monte Carlo simulations, we show that the correlation is not dominated by biases or selection effects. We also find that galaxy groups are more likely than clusters to host large radio galaxies, perhaps owing to the lower ambient gas density or a more efficient accretion mode. In these groups, radiative cooling of the intra-cluster medium could be less suppressed by active galactic nucleus heating. We conclude that the feedback processes that operate in galaxy clusters are also effective in groups.