Williams helped English side Saracens to win the Champions Cup and Premiership double last season and was part of the Wales team who won this year's Six Nations Grand Slam.
The 28-year-old is the first major player to announce his departure from Saracens after they were handed a 35-point deduction for breaching salary cap regulations and fined $10 million, a decision the club chose not to appeal.
"I've thoroughly enjoyed my time at Saracens over the past three seasons," Williams, who spent six years at Scarlets between 2011-2017, said in a statement https://www.saracens.com/williams-to-join-scarlets. "The environment has undoubtedly developed me as a player and a person.
"The opportunity to return home to the Scarlets was too good to turn down and I am incredibly excited about the future."
Williams played four times in this year's Rugby World Cup and scored two tries before an ankle injury ruled him out of the semi-final against eventual champions South Africa.