The 26-year-old, who had previous spells with Newcastle United and Carlisle United, joins the Scottish Premiership side following a year at the Banks's Stadium.
Gillespie is the first signing of the summer for the Scottish Cup and League Cup runners-up, and will wear the number 20 shirt at Fir Park.
"I'm excited to get going here," Gillespie told the official Motherwell website. "I'm here to work hard, improve and play in good games in a good league.
"I want to get involved, be part of the squad and look to push on from what they achieved last season."
The Steelmen finished seventh in the Scottish top flight last term.