He succeeds Laurent Fabius, 69, who announced on Wednesday he was stepping down as part of a cabinet reshuffle.
Mr Ayrault is, like Mr Fabius, a former prime minister, leading the government from 2012-14.
The leader of the Greens, Emmanuelle Cosse, has been named housing minister, and two other Green politicians have been given junior posts.
Segolene Royal - a former presidential candidate and Mr Hollande's ex-partner - has been given an expanded portfolio, becoming minister for environment, energy and the oceans, the Elysee Palace said.
Mr Fabius was seen as the architect of an interventionist foreign policy that saw French troops battle militants in Mali and take part in coalition air strikes against the so-called Islamic State group in Syria and Iraq in recent years.
Mr Fabius has been named to head France's Constitutional Council, which ensures bills comply with the constitution.
French President Francois Hollande has named Jean-Marc Ayrault as his new foreign minister.