Before 1974 scientists believed that the innermost planet in the Solar System didn’t have a magnetic field, but after the Mariner 10 space probe conducted three fly-bys near the planet it detected a magnetic field, which is 1.1 percent as strong as Earth’s. It is also similar to our planet in that respect as it is generated by the movement of liquid metal in the core.
But there is one thing the scientists failed to grasp. Magnetic fields require heat. On Earth it comes from the radioactive decay of elements and leftover heat from its formation. But Mercury is cold so it is unclear how it maintains its magnetic field. Some researchers claim that the small planet generates it due to the dynamo mechanism, but others say that's impossible due to Mercury’s slow 59-day rotation.