BepiColombo will launch in 2013 on a seven-billion-km flight to the innermost world, arriving in 2019.
The 350m-euro (£260m) deal with EADS Astrium will lead to the production of major spacecraft components in Germany, Italy, France and the UK.
BepiColombo will be one of Europe's most sophisticated scientific missions to date, Esa says.
"One of the key questions of planetary science is to understand the evolution of our Solar System," explained Dr Johannes Benkhoff, Esa's project scientist on the mission.
"And for that, Mercury is a candidate where we need to go. It is a planet of the extremes. It has huge temperature variations, it is the planet with the highest density and it has a very harsh radiation environment."
The signing comes in the same week as the US has passed by Mercury with its Messenger probe, the first spacecraft to visit the planet in more than 30 years.
Researchers hope that by following hard on the heels of the Americans, BepiColombo can help tie down the answers to the big questions that still remain over how this oddball world came into being.
The mission is a joint endeavour with the Japanese.
Japan will be responsible for the Mercury Magnetospheric Orbiter (MMO). It will investigate the planet's magnetic field with its five on-board instruments.
Like Earth (but unlike Venus and Mars) Mercury has a global magnetic field.
How so small a world, which appears - at the surface at least - to be utterly inactive, can produce this field is a major puzzle to planetary scientists.
Just as Messenger is a major technological advance on the Mariner 10 spacecraft which flew past the planet in the 1970s, so BepiColombo intends to improve still further the quality of the science return by introducing even more innovative approaches.
"Messenger paves the way for us," Dr Benkhoff told BBC News. "But unfortunately the Messenger will investigate in detail only one quarter of the planet; and so BepiColombo, because we are going into a roundish, much closer orbit, will be able to investigate the planet as whole."
The mission will provide:
But the close orbit to Mercury and the proximity to the Sun mean engineers face a number of major challenges. The biggest by far is the thermal environment.
BepiColombo will be baked directly by the Sun, receiving some 14,000 watts per square metre; about 10 times what a spacecraft in orbit around Earth would receive.
With some surfaces being roasted to temperatures in excess of 350C, BepiColombo will need multi-layer insulation and a highly efficient radiator to keep scientific instruments and electronics operating at normal temperatures.
Some parts of the spacecraft, though, cannot be hidden away.
"One example is the solar array which must be kept below 250C because that is the limit that can be withstood by the solar cells and their electronics," explained Dr Rainer Best, EADS Astrium's BepiColombo project manager.
"So you actually employ a trick; you have an array that comprises 60% mirrors and only 40% active cells. Mirrors will reflect the heat. We will also incline the array so the Sun is not perpendicular to it."
Esa admits however that it