Rennie joined the Hamilton-based Chiefs in 2012 and won two Super Rugby titles in his first two seasons, becoming the first first-year coach to win a Super Rugby title since 2000.
And he admitted the offer to coach outside of his native New Zealand at a club with an exciting vision was too good to turn down.
"The opportunity to work with such an exciting group of players at a club that has such big ambitions and a great winning culture was one I couldn't turn down," he said.
"It is no secret I have been interested in coaching abroad and this chance with Scottish Rugby fitted the bill perfectly.
"As a coach you want to test yourself in new environments with new challenges.
"The work Gregor and his team have done at the Warriors speaks for itself and I am very motivated to continue that success and build the club."
Townsend has led Glasgow Warriors for four years, reaching the Guinness PRO12 play-offs every season and leading the team to their first-ever domestic title in 2015.
But Warriors managing director Nathan Bombrys says the calibre of Townsend's replacement demonstrates the club's desire to grow and develop.
"We are incredibly proud at Glasgow Warriors that Gregor will be the next Scotland national coach at the end of next season," he said.
"Our club has a very strong culture and fantastic support from our fans, so it was important that our new head coach can help us to evolve and continue to be successful and grow our club on and off the pitch.
"The ambition of the club is demonstrated by the fact we're bringing in a championship-winning coach of the highest calibre."
Scottish Rugby CEO Mark Dodson added: "It is a clear indication of the progress Scottish Rugby, and Glasgow Warriors, are making that we can attract a coach of Dave's experience to Scotland.
"Gregor has developed a great winning culture at Glasgow Warriors and I'm very confident Dave will be able to build on that solid foundation to bring more success to the club.
"We have a group of talented Scottish players at Glasgow and we want to maintain their progress and this appointment will expose them to fresh ideas and new approaches to the game.
"Dave's experience at the Chiefs and at New Zealand age-grade level can only help to develop them and the team further."
Follow the Guinness PRO12 on Facebook, join the conversation on Twitter, sign up to our YouTube channel for extensive match highlights and sign up for our newsletter for regular updates on the Guinness PRO12.