The dynamics of our Universe is strongly influenced by pervasive—albeit elusive—dark matter, with a total mass about five times the mass of all the baryons1,2. Despite this, its origin and composition remain a mystery. All evidence for dark matter relies on its gravitational pull on baryons, and thus such evidence does not require any non-gravitational coupling between baryons and dark matter. Nonetheless, some small coupling would explain the comparable cosmic abundances of dark matter and baryons3, as well as solving structure-formation puzzles in the pure cold-dark-matter models4. A vast array of observations has been unable to find conclusive evidence for any non-gravitational interactions of baryons with dark matter5,6,7,8,9. Recent observations by the EDGES collaboration, however, suggest that during the cosmic dawn, roughly 200 million years after the Big Bang, the baryonic temperature was half of its expected value10. This observation is difficult to reconcile with the standard cosmological model but could be explained if baryons are cooled down by interactions with dark matter, as expected if their interaction rate grows steeply at low velocities11. Here we report that if a small fraction—less than one per cent—of the dark matter has a mini-charge, a million times smaller than the charge on the electron, and a mass in the range of 1–100 times the electron mass, then the data10 from the EDGES experiment can be explained while remaining consistent with all other observations. We also show that the entirety of the dark matter cannot have a mini-charge.