The name Mazar-e-Sharif means "Noble Shrine". This name represents the Blue Mosque which is widely known to be the grave of Hazrat Ali (prophet Mohammad's son-in-law).

The city and region became part of the Afghan Durrani Empire around 1750.

Mazar-e Sharif remained peaceful for the next one hundred years. In 1979 then neighboring Soviet Union invaded Afghanistan. During the 1980s Soviet war, Mazari Sharif was a strategic base for the Soviet Army.

Between May and July 1997, the Taliban unsuccessfully attempted to take Mazar. About 3,000 Taliban soldiers were killed by Abdul Malik and his Shia followers.[2] The Taliban returned on August 8, 1998 and led a six-day killing frenzy of Hazaras. Soon after, the city was occupied and taken over by the Taliban.

Following 9/11, Mazar Sharif was the first Afghan city to fall to the Northern Alliance (United Front). The Taliban's defeat in Mazar quickly turned into defeat from the rest of the north and west of Afghanistan. On November 9, 2001 the city was captured by the Afghan Northern Alliance forces after the Battle of Mazar e Sharif with help from the United States Special Operations Forces and bombing by U.S. Air Force aircraft. As many as 2,000 Taliban fighters who surrendered were reportedly massacred by the Northern Alliance after the battle. Reports also place U.S. ground troops at the scene of the massacre.[3]

Mazar-e Sharif serves as the major trading center in northern Afghanistan. It was the first city to connect itself by rail with a neighboring country. The rail service from Mazar-e Sharif to Uzbekistan began in 2011 and is expected to rapidly boost the economy of the city. Cargo on freight trains arrives to the last station near Mazar-i-Sharif Airport,[5] where the goods are reloaded onto trucks or airplanes and sent to their last destinations across Afghanistan.

The local economy is mainly trade, agriculture and karakul production. Some oil and gas have also boosted the city's economy.