Mercury's magnetic field is approximately a magnetic dipole (meaning the field has only two magnetic poles) apparently global, on planet Mercury. Data from Mariner 10 led to its discovery in 1974; the spacecraft measured the field's strength as 1.1% that of Earth's magnetic field. The origin of the magnetic field can be explained by dynamo theory. The magnetic field is strong enough near the bow shock to slow the solar wind, which induces a magnetosphere.
The magnetic field is about 1.1% as strong as Earth's. At the Hermean equator, the relative strength of the magnetic field is around 300 nT, which is weaker than that of Jupiter's moon Ganymede. Mercury's magnetic field is weaker than Earth's because its core had cooled and solidified more quickly than Earth's. Although Mercury's magnetic field is much weaker than Earth's magnetic field, it is still strong enough to deflect the solar wind, inducing a magnetosphere. Because Mercury's magnetic field is weak while the interplanetary magnetic field it interacts with in its orbit is relatively strong, the solar wind dynamic pressure at Mercury's orbit is also three times larger than at Earth.
Whether the magnetic field changed to any significant degree between the Mariner 10 mission and the MESSENGER mission remains an open question. A 1988 J.E.P. Connerney and N.F. Ness review of the Mariner magnetic data noted eight different papers in which were offered no less than fifteen different mathematical models of the magnetic field derived from spherical harmonic analysis of the two close Mariner 10 flybys, with reported centered magnetic dipole moments ranging from 136 to 350 nT-RM3 (RM is a Mercury radius of 2436 km). In addition they pointed out that "estimates of the dipole obtained from bow shock and/or magnetopause positions (only) range from approximately 200 nT-RM3 (Russell 1977) to approximately 400 nT-RM3 (Slavin and Holzer 1979b)." They concluded that "the lack of agreement among models is due to fundamental limitations imposed by the spatial distribution of available observations." Anderson et al. 2011, using high-quality MESSENGER data from many orbits around Mercury – as opposed to just a few high-speed flybys – found that the dipole moment is 195 ± 10 nT-RM3.
Before 1974, it was thought that Mercury could not generate a magnetic field because of its relatively small diameter and lack of an atmosphere. However, when Mariner 10 made a fly-by of Mercury (somewhere around April 1974), it detected a magnetic field that was about 1/100th the total magnitude of Earth's magnetic field. But these passes provided weak constraints on the magnitude of the intrinsic magnetic field, its orientation and its harmonic structure, in part because the coverage of the planetary field was poor and because of the lack of concurrent observations of the solar wind number density and velocity. Since the discovery, Mercury's magnetic field has received a great deal of attention, primarily because of Mercury's small size and slow 59-day-long rotation.
The origins of the magnetic field can be explained by the dynamo theory; i.e., by the convection of electrically conductive molten iron in the planet's outer core. A dynamo is generated by a large iron core that has sunk to a planet's center of mass, has not cooled over the years, an outer core that has not been completely solidified, and circulates around the interior. Before the discovery of its magnetic field in 1974, it was thought that because of Mercury's small size, its core had cooled over the years. There are still difficulties with this dynamo theory, including the fact that Mercury has a slow, 59-day-long rotation that could not have made it possible to generate a magnetic field.
This dynamo is probably weaker than Earth's because it is driven by thermo-compositional convection associated with inner core solidification. The thermal gradient at the core–mantle boundary is subadiabatic, and hence the outer region of the liquid core is stably stratified with the dynamo operating only at depth, where a strong field is generated. Because of the planet's slow rotation, the resulting magnetic field is dominated by small-scale components that fluctuate quickly with time. Due to the weak internally generated magnetic field it is also possible that the magnetic field generated by the magnetopause currents exhibits a negative feedback on the dynamo processes, thereby causing the total field to weaken. 
Like Earth's, Mercury's magnetic field is tilted, meaning that the magnetic poles are not located in the same area as the geographic poles. As a result of the north-south asymmetry in Mercury's internal magnetic field, the geometry of magnetic field lines is different in Mercury's north and south polar regions. In particular, the magnetic "polar cap" where field lines are open to the interplanetary medium is much larger near the south pole. This geometry implies that the south polar region is much more exposed than in the north to charged particles heated and accelerated by solar wind–magnetosphere interactions. The strength of the quadrupole moment and the tilt of the dipole moment are completely unconstrained.
There have been various ways that Mercury's magnetic field has been measured. In general, the inferred equivalent internal dipole field is smaller when estimated on the basis of magnetospheric size and shape (~150–200 nT R3). Recent Earth-based radar measurements of Mercury's rotation revealed a slight rocking motion explaining that Mercury's core is at least partially molten, implying that iron "snow" helps maintain the magnetic field. The MESSENGER spacecraft was expected to make more than 500 million measurements of Mercury's magnetic field using its sensitive magnetometer. During its first 88 days in orbit around Mercury, MESSENGER made six different sets of magnetic field measurements as it passed through Mercury's magnetopause.
Scientists noted that Mercury's magnetic field can be extremely "leaky," because MESSENGER encountered magnetic "tornadoes" during its second fly-by on October 6, 2008, which could possibly replenish the atmosphere (or "exosphere", as referred to by astronomers). When Mariner 10 made a fly-by of Mercury back in 1974, its signals measured the bow shock, the entrance and exit from the magnetopause, and that the magnetospheric cavity is ~20 times smaller than Earth's, all of which had presumably decayed during the MESSENGER flyby. Even though the field is just over 1% as strong as Earth's, its detection by Mariner 10 was taken by some scientists as an indication that Mercury's outer core was still liquid, or at least partially liquid with iron and possibly other metals.
BepiColombo is a joint mission of the European Space Agency (ESA) and the Japan Aerospace Exploration Agency (JAXA) to Mercury. It is launched in October 2018. Part of its mission objectives will be to elucidate Mercury's magnetic field.