The Scotland international stand-off has agreed to return his hometown club in the summer after spending the last three seasons with Worcester Warriors.
Glasgow said Weir had signed “a long-term contract” but, as is their policy, would not reveal the exact length of the deal.
Danny Wilson, the club’s head coach, is also trying to sign another stand-off for cover this season having lost Adam Hastings to a shoulder injury.
Reports in Ireland have linked Glasgow with Ian Keatley, the former Munster No 10 who has been released by Benetton.
Wilson said of Weir’s return: “Duncan is an experienced solid international ten who will give us a strong game management and goal kicking platform.
“He’s Glasgow born and bred and someone who we believe will fit seamlessly back into our squad.”
Weir, 29, was part of the Glasgow side which won the Guinness Pro12 in 2014-15 season. He left the club in 2016 to join Edinburgh before heading south.
“It’s massively exciting for me to be coming back to Glasgow Warriors,” Weir told glasgowwarriors.org.
“Glasgow is my home and Glasgow Warriors is my boyhood club where it all began. It’s always a massive honour pulling on the jersey and I’m really looking forward to doing it again.
“I’ve had some great chats with Danny. I’m excited to play a part in Glasgow’s future and helping drive the club on to winning more silverware and competing at the top end of the table which we are both hugely passionate about.
“For my family it’s going to be amazing just to being so close to home and the thought of my children growing up in Glasgow was hugely appealing to us when we were weighing up our options.
“I can’t wait to get back out in front of the crowds at Scotstoun. You can’t beat the atmosphere of a game under the Friday night lights.”
Weir forced his way back into the Scotland squad last year after a three-year absence, playing against France (twice) and Italy.