The Australian leg-spinning legend has agreed a two-year deal with an option for a further two-year rolling contract.
Warne, 35, has already spent two years with Hampshire including last season when he was captain and is buying a house near the club's Rose Bowl headquarters just outside Southampton, southern England.
This season he will play for Hampshire until July 11 before competing in the Ashes series in England and then return to play in the County's final four matches.
Warne is the world's leading Test wicket-taker with 566 and went in to the Test against New Zealand in Christchurch this week needing another four wickets to reach 1,000 in all first-class matches.
Hampshire chairman Rod Bransgrove was delighted with Warne's commitment to the county. "Shane has already woven himself into the very fabric of Hampshire cricket and it is fantastic news.
"His captaincy last season was inspirational and he will be a major influence in our plans to establish Hampshire as one of the country's leading teams," Bransgrove added.
In his first season in 2000, Warne took 108 wickets in all competitions and another 73 when he returned last year.
Hampshire manager, Perth-based Paul Terry said: "We can now continue the development of our team around Shane's extraordinary abilities as a natural leader and a world-class match winner."
Hampshire won promotion to the first division of the County Championship last season aand will be boosted this term by the arrival of dashing South African-born England batsman Kevin Pietersen from Nottinghamshire.