The midfielder spent three years at Tannadice but leaves after their relegation from the Premiership.
Saints manager Tommy Wright told his club website: "Paul is underestimated - he's an aggressive player but has a lot of real quality too.
"His range of passing is excellent and throughout this career his attitude on the pitch has been great."
St Johnstone have already secured midfielders Blair Alston and Michael Coulson from Falkirk and York City respectively, while defeners Keith Watson is making the switch from St Mirren.
"We believe we've captured another good signing for the forthcoming season - our fourth - and I think in all four we are bringing quality and experience into the squad," said Wright.
"It not only improves the quality but also in terms of depth we are sitting, I believe, in a good position.
"I've always emphasised the point that it is the whole squad that has enabled this football club to achieve what it has these past few seasons and the addition of Paul will enhance that."
Paton joined United in the summer of 2013 from Partick Thistle, going on to make 90 appearances for the club.
He captained the side in the latter stages of last season and thanked the club's supporters "and everybody at Tannadice" on the club's website.
"There will always be a tangerine spot in my heart and I wish Dundee United every success in returning to the Scottish Premiership next season," he said.
Find all the latest football transfers on our dedicated page.
Paul Paton has signed a two-year deal with St Johnstone after leaving Dundee United by "mutual agreement".