The 35-year-old has completed a free transfer move to League Two Gillingham – with the length of the deal is yet to be disclosed.
It comes after the midfielder was one of four Blues players released by Danny Cowley in May – alongside Callum Johnson, Paul Downing and Ollie Webber.
Williams’ departure signalled the end of a one-year stay at Fratton Park, following his recruitment last summer from Millwall.
Most Popular
-
1
'I don't think I realised how much it would mean': ex-Cardiff City and Bristol City man's Portsmouth admission as he chases winning Fratton feeling after homecoming
-
2
Former Portsmouth, Sunderland and Millwall ace Aiden O'Brien suffers setback as frustrating start to life at Shrewsbury continues
-
3
Danny Cowley makes Portsmouth team selection admission following Cheltenham win - and gives honest assessment of current squad amid early-season promotion hopes
-
4
Colby Bishop gives Spurs loanee and England youngster Dane Scarlett raving reviews after making Portsmouth league debut
-
5
The role ex-Leicester City, Birmingham City and Charlton Athletic man wants to maintain at Portsmouth after guiding city's young gems at Reading
In that time the Irishman made 35 appearances in all competitions for the Blues, but missed the majority of the season from February onwards after sustaining a serious back injury.
His arrival at Gills, where he will link up with former Lions boss Neil Harris, represents the fifth club of Williams’ career.
After penning his contract, he told Gillingham’s official website: ‘I am really pleased to be here.
‘I'm excited at the opportunity ahead and I'm grateful to be working with Neil again.
‘I'm a controlled kind of player, I like to get on the ball and I like to do what I can for the team.
‘I don't want any headlines, I like to go under the radar. I'm looking forward to getting going.’
Williams made 236 appearances under Harris at Millwall, earning promotion to the Championship in 2016.
The pair will be hoping they can capture the same success at Priestfield next term, with immediate promotion back to League One the target.
Harris added: ‘I am delighted to get Shaun Williams within the group – an experienced player that I've worked with in the past.
‘I know the characteristics that Shaun will bring to the dressing room, but also the pitch.
‘He provides a calming influence, on and off the pitch, he is a leader in the changing room. He is a very, very intelligent footballer, and quality player at the level.’