When two lead nuclei collide in the LHC at an energy of a few TeV per nucleon, an extremely strong magnetic field of the order 1014 –1015 T is generated by the spectator protons, which pass by the collision zone without breaking apart in inelastic collisions. The strongest yet probed by scientists, this magnetic field, and in particular the rate at which it decays, is interesting to study since it probes unexplored properties of the quark–gluon plasma (QGP), such as its electric conductivity. In addition, chiral phenomena such as the chiral magnetic effect are expected to be induced by the strong fields. Left–right asymmetry in the production of negatively and positively charged particles relative to the collision reaction plane is one of the observables that is directly sensitive to electromagnetic fields. This asymmetry, called directed flow (v1), is sensitive to two main competing effects: the Lorentz force experienced by charged particles (quarks) propagating in the magnetic field, and the Faraday effect – the quark current that is induced by the rapidly decreasing magnetic field. Charm quarks are produced in the early stages of heavy-ion collisions and are therefore more strongly affected by the electromagnetic fields than lighter quarks. ALICE has probed this effect by measuring the directed flow, v1, for positively and negatively charged hadrons and D mesons containing positively and negatively charged charm quarks (antiquarks) as a function of pseudorapidity (η) in mid-central lead–lead collisions at √sNN = 5.02 TeV. For both charged hadrons and D mesons, the lower panels of the figure show indications of a positive slope with pseudorapidity of the v1 difference, although not yet with full significance. Together with recent observations at RHIC, these LHC measurements provide an intriguing first sign of the effect of the large magnetic fields experienced in heavy-ion collisions on final-state particles. Measurements with larger data samples in Run 3 will have a precision sufficient to allow the contributions of the Lorentz force and the Faraday effect to be separated.