The Earth, Venus, Mars, and some extrasolar terrestrial planets have a mass and radius that is consistent with a mass fraction of about 30% metallic core and 70% silicate mantle. At the inner frontier of the solar system, Mercury has a completely different composition, with a mass fraction of about 70% metallic core and 30% silicate mantle. Several formation or evolution scenarios are proposed to explain this metal-rich composition, such as a giant impact, mantle evaporation, or the depletion of silicate at the inner-edge of the proto-planetary disk. These scenarios are still strongly debated. Here we report the discovery of a multiple transiting planetary system (K2-229), in which the inner planet has a radius of 1.165+/-0.066 Rearth and a mass of 2.59+/-0.43 Mearth. This Earth-sized planet thus has a core-mass fraction that is compatible with that of Mercury, while it was expected to be similar to that of the Earth based on host-star chemistry. This larger Mercury analogue either formed with a very peculiar composition or it has evolved since, e.g. by losing part of its mantle. Further characterisation of Mercury-like exoplanets like K2-229 b will help putting the detailed in-situ observations of Mercury (with Messenger and BepiColombo) into the global context of the formation and evolution of solar and extrasolar terrestrial planets.