The 37-year-old batsman is returning to his native New Zealand where he hopes to continue his playing career and will pursue job opportunities for life after cricket.
A firm favourite with Gloucestershire supporters “Marshy” was awarded a benefit year in 2015, a season in which he helped his side beat Surrey to win the Royal London One-Day Cup at Lord’s.
He said: “I have had 11 incredible years at Gloucestershire and would like to thank my team mates, the staff and the supporters for making it such a memorable time.
“At the stage I am at in my career I have to start thinking about life after cricket and what is best for my family. I am lucky enough to have been offered an opportunity that is too good to turn down and in order to take this up I will be leaving Gloucestershire at the end of the season.
“I have so many amazing memories from my time here but the highlight has to be winning the Royal London One-Day Cup at Lord’s last year – that is something that will stay with me forever.
“There is still a lot of cricket to be played until the end of the season and I look forward to trying to keep scoring runs and helping the side fight for success in all three competitions.”
Hamish joined Gloucestershire in 2006 – initially as an overseas player.
He played 13 Tests, 66 ODIs and three T20 internationals for New Zealand before committing to Gloucestershire as a home-qualified player through an Irish passport in 2008.
He finished top of the club’s 40-over and Twenty20 batting averages that year and has been a mainstay of the middle order across all formats ever since.
In 2011 Hamish and Kevin O’Brien set a T20 record partnership of 192 for the first wicket against Middlesex at Uxbridge, helping Gloucestershire to a total of 254-3 which remains the highest score in domestic 20-over cricket.
He is also Gloucestershire’s highest-ever T20 run scorer with more than 2537 runs so far.
Gloucestershire chief executive Will Brown said: “Hamish is a model professional and has been a wonderful role model and ambassador for the club.
“He holds a dear place in the heart of Gloucestershire supporters who have admired his skill and warmed to him as a down-to-earth and humble man.
“As a senior player in the dressing room he has played a crucial role in helping to develop the talented group of youngsters that went on to achieve success in the Royal London One-Day Cup and I have no doubt he will continue to be an integral part of the team for the remainder of the season.”
“The club would like to thank Hamish for his outstanding service over the last 11 years and we wish him and his family all the very best for the future.”