The treaty will require countries with coal-fired power plants such as India and China to install filters and scrubbers on new plants and to commit to reducing emissions from existing operations to prevent mercury from coal reaching the atmosphere.
The deal also includes measures to reduce mercury use in small-scale gold mining, although stopped short of an all-out ban. Gold prices near $1,700 a tonne have spurred the use of mercury as a catalyst to separate gold from its ore.
The legally-binding agreement aims to phase out many products that use the toxic liquid metal such as batteries, thermometers and some fluorescent lamps, through banning global import and exports by 2020.
Countries failed to agree on including vaccines where mercury is sometimes used as a preservative.
As mercury, also known as quicksilver, is released to the air or washed into rivers and oceans, it spreads worldwide, and builds up in humans mostly through consumption of fish. The brains of foetuses and infants are particularly vulnerable to damage from mercury.