McConnell was an Elite Development player with the Warriors between 2010 and 2013 and made two appearances for the club in the RaboDirect PRO12
.
The 21-year-old has impressed for Ayr in the RBS Premiership this season and was included on the bench for Glasgow in their win over Connacht at Scotstoun in February.
The former Lenzie Academy pupil was part of the Scotland Under-20 set-up during the RBS 6 Nations in 2012.
Murray McConnell said: "I'm looking forward to returning to Scotstoun as a professional player, after being part of the Elite Development Programme last season.
"Niko (Matawalu) and Henry (Pyrgos) are two very good scrum-halves and I know I can learn a lot from them.
"I'm ambitious and I want to play at as high a level as possible and I'll get that opportunity at Scotstoun. It's an exciting time to be re-joining the club."
Glasgow Warriors head coach Gregor Townsend said: "Murray has been training with us this season so he'll fit straight in when he joins us on a full-time basis in the summer.
"He's had a very good season with Ayr and we've been following his progress closely. He'll be an excellent addition to our squad."
Guinness PRO12
Suite 208, Alexandra House,
The Sweepstakes
Ballsbridge, Dublin 4, Ireland