In a statement read to journalists, state prosecutor Justin Gbenameto said a colonel and businessman were arrested for plotting “to block the head of state from returning to Cotonou after his trip and to institute a military regime.”
Yayi, who recently completed a one-year term as chairman of the African Union, had travelled to Equatorial Guinea last month for a summit with South American leaders.
Gbenameto said Colonel Pamphile Zomahoun and prominent accountant and businessman Johannes Dagnon were in custody and investigations were continuing.
The prosecutor urged citizens to “have confidence” in the authorities.
Alleged plots against the government are not new for the small west African nation that borders Nigeria.
Last year, businessman Patrice Talon, the president’s niece and others were arrested after being accused of scheming to replace the president’s heart medication with poison.