Rehman enjoyed a hugely-successful spell with Somerset this year when he claimed 27 wickets at just 14.19 in four LV= County Championship matches, including innings figures of nine for 65 against Worcestershire.
Rehman, 32, is currently serving a 12-week ban handed out by the England and Wales Cricket Board in October after testing positive for cannabis following Somerset's championship game with Nottinghamshire on August 8.
Rehman, who has played 17 Tests and 25 one-day internationals for Pakistan, said: "I am happy to be coming back to England to play for Somerset, I really enjoyed my time there last year and will look to play with the same intensity and passion.
"I would also like to thank the Somerset management and fans for their support in what has been a difficult period for me."
On the subject of Rehman's ban, Somerset chief executive Guy Lavender said: "The club in no way condones the use of illegal drugs. It was heartening to see that he admitted his mistake and has been punished accordingly.
"It is now time to move on and I am very confident he will do extremely well for us next season."
Confirmation of Rehman's return follows last month's capture of South African Test opener Alviro Petersen as overseas player for the first half of next season.
Somerset chairman of the cricket committee Vic Marks said of Rehman: "At the moment he is contracted to play the final few weeks of the season which will include five championship games and one-day cricket as well.
"Subject to his international commitments we will try to extend his contract through into the T20 period to make him available for that as well."
- Sports & Recreation