In that time the 26-year-old has won four England caps and made 121 Premiership appearances for the Sharks with seven tries.
"I know from first-hand experience what Gloucester Rugby means to the players and supporters. It is a fantastic club - one of the strongest and most progressive in Europe - and I am thrilled to be joining them," Titterrell told www.gloucesterrugby.co.uk.
"I am positive that moving to Gloucester, with their tradition, history and passion will be good for me and I am more than ready for the challenge that presents.
"When I had the opportunity to speak to their coaching team I was hugely impressed with the standard of facilities, their vision for the club's development and their thirst for success and that is something I want to be involved in.
"Sale were instrumental in my development as a rugby player and I thank them for that, but this is a new period in my career and I am excited about moving south."
Titterrell made his Sale debut in 2001 against Auch and after winning an England schoolboy cap, appeared for the A team against Ireland in 2002. Following a series of outstanding displays, he impressed then national coach Sir Clive Woodward enough to be rewarded with a place in the Elite Player Squad in 2003.
A year later, he won his first senior cap against the All Blacks in Auckland and followed that up with selection for the 2005 British Lions tour to New Zealand.
Last season he missed only one game in the entire season for Sale - against Llanelli in the Powergen Cup - as he played a key role in the Sharks' Premiership triumph against Leicester.
"We are attempting to develop our squad to a level that is capable of challenging anywhere in Europe so to have the opportunity to sign a player of Andy's quality is great for us," head coach Dean Ryan added.
"He is an individual who impresses us greatly - he has tremendous determination to be successful and that is the sort of attitude we want at this club.
"Andy is an international-quality footballer and the opportunity to sign those sorts of players does not come around that often. He will add a great deal to our squad."