The 41-year-old Samaraweera, who retired from Test cricket in 2013, had been a batting consultant for the Bangladesh team, Sri Lanka Cricket said in a statement.
"SLC announces today the recruitment of former Sri Lankan right hand batsman Thilan Samaraweera as batting coach to the national team for a period of three years," it said.
Samaraweera is due to join the Sri Lanka squad before they leave for India later this week to play three Tests, three one-day internationals and three Twenty20 games.
Sri Lanka currently has an interim head coach -- South African Nic Pothas -- who took the place of Graham Ford after he quit in June, midway through a 45-month contract.
Sri Lanka has had a dismal record recently losing all nine international games during a home series against India between July and September.
They won a two-match Test series against Pakistan, but lost all five one-day internationals and the three T20 matches last month.
First Published: November 5, 2017, 8:11 PM IST