Leading the field is Prime Minister Lionel Zinsou, a former economist and investment banker backed by both Boni Yayi and the main opposition Democratic Renewal Party.
By relinquishing power as mandated by law, Boni Yayi stands out from leaders in countries such as Burundi, Rwanda and the Congo Republic, who have circumvented limits on their time in office.
“I am proud of the conditions in which the campaign took place. It was a campaign without violence and an exercise in democracy,” Zinsou said as he voted in the capital.
Local media later said provisional results showed that Zinsou would advance to a run-off election, having gained a plurality of the votes, and would face prominent businessman Patrice Talon.
There were no results yet from the national electoral commission.
Benin produces cotton, but its economy is flagging, in part because falling oil prices have hit its neighbour Nigeria, its largest trading partner. A big choice facing voters was who would best create jobs and improve education.
Some polling stations in the capital stayed open beyond the set closing time to allow people already in line to cast their ballots, a witness said.
“It’s a matter of pride for me to have done my duty as a citizen,” said Clarisse Nibime, who voted in the capital.
The election reinforces Benin’s credentials as a model of democracy in sub-Saharan Africa. The country became the first to move from dictatorship and single-party rule to multi-party democracy when it held elections in 1991.
“With my departure our democracy will take one further step forward … I leave the republic with national unity,” Boni Yayi said as he cast his ballot.