The 27-year-old has spent his entire career in Llanelli, scoring 21 tries in his 124 appearances and has often captained the team in the absence of regular skipper Ken Owens.
Williams made his 50th appearance for his country in Saturday's defeat to New Zealand and has now confirmed he will leave the region.
Although the center admits it was a tough decision, he believes the move to Swansea is the best call for his career and is now focused on giving his all in his final months at Parc y Scarlets.
Williams said: "I hope it goes without saying that this has not been an easy decision for me, but ultimately, I feel it is a move that is the right option for me at this time in my career.
"I've loved every minute of my 11 years at the Scarlets. I will always be grateful to the Board, Wayne and his team, and all associated with the club, for their support over those years.
"Once this weekend and the international period are complete, I'll be back at the Scarlets, determined to positively contribute to achieving our goals for this season."