"The German people is acting with a courage that invites respect," Ayrault said at Berlin-Tegel airport where he stopped before leaving for Ukraine with his German counterpart Frank-Walter Steinmeier.
Paris and Berlin both wish to "improve the control of refugees and stop irregular migrants", he added.
On 12 February Prime Minister Manuel Valls described Merkel's policy as "temporarily justifiable" but insisted that it is "not tenable in the long term".
He also said that France was not in favour of quotas for the numbers of refugees European countries would take in.
In September, after Syrian child Aylan Kurdi's body was found washed up on a Greek beach, President François Hollande backed the idea.
But the government has toughened its stance as the refugee crisis drags on and in the light of the November Paris attacks.
Ayrault on Monday refrained from outright criticism of Germany's stance.
"The strength of the Franco-German relationship is that we always look for solutions," he said. "Our differences are a strength when we decide in this way."
France intends to accept 30,000 refugees, while Germany took in more than a million last year.