McDonald told BBC Radio Lancashire: "I feel I'm coming into my best years and I wanted to be back down south having enjoyed my time at Oldham.
"I felt it was the right time for a fresh challenge."
Irvine-born McDonald, who has one Scotland B cap, started his career at nearby Kilmarnock in July 2001.
The whole set-up here is geared towards moving forward and everyone behind the club are good people
Morecambe midfielder Gary McDonald
He joined Oldham in 2006, going on to make 92 appearances at Boundary Park.
McDonald then returned to Scotland in August 2008 after joining Jimmy Calderwood's Aberdeen, before switching to Hamilton two years later.
But after completing his move to Morecambe, he admits he had no hesitation in agreeing terms with new Shrimps boss Jim Bentley.
"I think it's a club that's moving in the right direction," he said.
"The whole set-up here is geared towards moving forward and everyone behind the club are good people. They've got good intentions for where they want the club to go.
"When I spoke to the manager you could tell he's very ambitious and very driven at what he wants to achieve here, and I just want to be part of it."
McDonald is Morecambe's fourth signing of pre-season following the recent arrivals of Kevin Ellison, Izak Reid and Lewis Alessandra.
Source: BBC Sport
Source: BBC Sport