The former Scotland defence coach and British and Irish Lions assistant coach will take charge from September 1, as Wales prepare for November's Autumn International series, when they face New Zealand, world champions South Africa, Argentina and Japan.
They had slipped to 14th in the rankings before beating Japan to end an 18-game winless run.
"Becoming head coach of my home country is a massive honour and a privilege," Tandy said in a statement.
"I am looking forward to playing a role in the rebuilding phase of Welsh rugby and taking the national team back to competing with the best countries in the world.
"I am excited about the potential of Welsh rugby and the group of young, hardworking players we have."
Wales appointed Matt Sherratt as interim coach following the exit of Warren Gatland during this year's Six Nations, but he always said he was not interested in the job on a permanent basis.
"After a thorough and detailed appointment process, Steve emerged as the standout candidate, and we know we have secured the very best coach for the job," Welsh Rugby Chief Executive Officer Abi Tierney said.
"This is a keystone appointment for us and an integral part of our five-year strategy as we look to achieve sustainable success for our senior men’s side."
--Reuters--