Macron this week complained of "repeated attacks" on his presidential campaign's website and his spokesman, Benjamin Griveaux, directly blamed Russia.
Ayrault gave credit to the claims when asked if he believed that US President Donald Trump and Russian President Vladimir Putin want to weaken Europe by the Journal du Dimanche newspaper.
"It's enough to see which candidates, Marine Le Pen or Francois Fillon, Russia expresses preference for in the French election campaign," he said. "Whereas Emmanuel Macron, who is very pro-Europe, is being targeted by cyberattacks."
Le Pen has promised a referendum on EU membership if she is elected and her National Front received a loan from a Russian bank last year, while Fillon has called for an end to EU sanctions against Russia over the Ukraine conflict and a change in Europe's attitude to Putin's government.
Pointing out that Russia " is the first to say that non-interference in domestic affairs is a cardinal rule", Ayrault said that France will not put up with having its electoral choices dictated from outside.
"This form of interference in French democratic life is unacceptable and I condemn it," he declared.
German Chancellor Angela Merkel, whose country will hold a general election in September, has also voiced fears that Moscow could try to influence the vote through cyberattacks or disinformation.
A special meeting of the French Defence Council is planned next week to strengthen measures to protect against this kind of threat.