The 39-year-old left Hibs in September after seven years at Easter Road, starting out as the head of recruitment before becoming sporting director.
He has been given a “wide-ranging remit” at Ayr, managing the club on a day-to-day basis, with Jim Duffy remaining in charge of first-team affairs.
Mathie lives in the town and previously enjoyed a brief spell at the club – which also incorporated a youth coaching role – in a playing career that also included stints with Coventry, Bournemouth, Motherwell, East Fife and Albion Rovers.
He told the club website: "I'm here because this is a project that really excites me, and that was apparent from my first conversation with the chairman, David Smith.
Hearts exit on the cards for Josh Ginnelly
Lee Johnson addresses Hearts claims that Hibs over-celebrated derby equaliser
Steve Kean reaction as Hibs B bow out of SPFL Trust Trophy and Paul Hanlon gets minutes under his belt
Hearts B come up short against Buckie Thistle in SPFL Trust Trophy
Lee Johnson open to more transfer ins and outs but admits Hibs have overspent budget on Martin Boyle
“As someone who lives in Ayr, no-one has to tell me about the potential of this club but David has demonstrated a real hunger to combine some ambitious capital projects with progress on the football front and that isn't limited to the first-team.
“Sometimes people say the right things about having a commitment to youth development and about being a community club.
“It's clear from what David had to say that he wants to match words with action and that is something I'm passionate about being part of.”
Smith added: “Graeme's appointment represents a hugely significant moment for Ayr United.
“He is someone with a proven pedigree who is used to operating at the top of the Scottish game, while also possessing an in-depth knowledge of the different challenges and opportunities that present themselves from grassroots to the elite level.
“He is vastly experienced in footballing circles and his CV speaks for itself. We will benefit from his leadership and experience.”
He was responsible for bringing in Kevin Nisbet and Martin Boyle and opening the academy pathway to bring the likes of Ryan Porteous and Josh Doig through.
However, he was criticised for a poor recruitment drive during the summer transfer window, with a deadline day move for St Mirren midfielder Jamie McGrath failing to materialise.