The 37-year-old, who made over 400 appearances for Lancashire and claimed more than 800 wickets in all competitions, has signed a two-year contract with Surrey that ties him to the Kia Oval until the end of the 2015 season.
Keedy said: "I have had a fantastic 18 seasons at Lancashire and would like to thank all the players, staff and members there for everything they have done for me."
He went on: "However, I have reached the time in my career when I need to move on in order to fulfil my ambitions and I am very excited to be joining Surrey at this time. They are a great club with a long history and an exciting future and I am really looking to playing my part over the next few seasons."
Surrey team director Chris Adams said: "Gary Keedy has been one of the leading bowlers in county cricket for over a decade and I am delighted he will be joining us for the next two seasons.
"As well as his fantastic ability with the ball, he will play a valuable role in the dressing room throughout the year - helping to impart his experience to the younger members of our squad."