Sammy is currently leading the West Indies in the ongoing World Twenty20 tournament in India and will be available for Hampshire duty until his Caribbean Premier League commitments start in July.
The 32-year-old St Lucian also recently featured in the Pakistan Super League in a team captained by Shahid Afridi who will be a teammate at Hampshire.
Sammy had a short spell in the T20 Blast with Nottinghamshire last season, averaging 41 with the bat in four matches.
His first match for Hampshire will be against Kent on June 2, the club said in a statement.
"They also have a rich West Indian history which I'm looking forward to adding to the best I can," he added with Caribbean greats such as former opening batsman Gordon Greenidge and late fast bowler Malcolm Marshall both having had extensive Hampshire careers.
"I can't wait to meet my new teammates in June.