Cumbria-born Guy had been told he was free to find a new club and had been training with Carlisle before reaching agreement with Saints to end his contract a year before it was due to expire.
A St Mirren club statement read: "It has been confirmed (on Friday) morning that Lewis Guy has cancelled his contract with St Mirren Football Club by mutual consent."
The 27-year-old joined St Mirren a year ago from MK Dons and hit six goals in 35 appearances.
His final appearance, in a goalless draw with Aberdeen in the penultimate match of the season, saw him substituted 16 minutes after coming on, following an exchange of words with assistant manager Tommy Craig.
Guy, who made over 160 appearances for Doncaster during a five-year spell there prior to joining MK Dons, could be involved in the Cumbrians' forthcoming friendlies.
- Sports & Recreation
- St Mirren
- Lewis Guy