He was up against rival and ex-Finance Minister Soumaila Cisse, who admitted defeat in the second round.
Mr Keita, 68, served as prime minister from 1994 to 2000 and will now oversee the rebuilding of the West African state which has been promised some $4 billion in international development aid.
International observers called the election a success.
"This election, from a democratic standards point of view, is a success," said the head of a European Union observer mission, Louis Michel. "It is an election that allows Mali now to start finishing the process that it has begun: the return to a normal democracy."
Maintaining peace in northern Mali will be one of Keita's main priorities.
Image: © Thinkstock
Copyright is owned by Africa Outlook and/or Outlook Publishing. All rights reserved.