The 45-year-old has held the position since June 2017 and guided Scotland to a third-place finish at the 2018 Six Nations, where they beat England for the first time in 10 years.
Danny Wilson was appointed Scotland's new forwards coach in June after Scottish Rugby agreed terms to release the former Cardiff Blues man from a deal to join Wasps.
"It's a privilege to coach such a hardworking group of quality players, which is continuing to grow in depth," Townsend told BBC Sport.
"I have always been incredibly proud to coach Scotland and I'm delighted and grateful to be able to extend my involvement with the national team."
Townsend had five years in charge of Glasgow Warriors, leading the Scotstoun side to the Pro12 title in 2015 before taking on the Scotland job.