The 31-year-old made the switch from Gloucester to Cardiff in 2009 but has since only made 22 appearances for the region.
This season he has only featured in two games, with the problem then flaring up again.
"I've come to an amicable agreement with Cardiff Blues and would like to thank them for all their support over the years," said Cooper.
"It's been a frustrating couple of years for me and things haven't quite worked as I'd hoped. I don't think I've shown my full potential at the Blues due to the groin injury.
"I've been told by the medical team that I need a full rest from the game for between six to 12 months.
"The groin injury started to hurt in the summer of 2009 and it's got progressively worse. Throughout that period I'd been playing with a lot of pain and had to have two operations on the groin and then a double hernia operation.
"This season I've played 20 minutes against Treviso and started against Connacht but I had to take pain killers, so the doctors have recommended that I am to rest fully for up to a year.
"Obviously I will miss all the players and management who have been fantastic with me since I arrived and would like to wish them the best of luck for the future."
Cardiff Blues chief executive Robert Norster was clearly disappointed by the news but has praised the scrum-half and wished him a successful future.
"It is hugely disappointing news for both Gareth and the Blues that such a talented player is sidelined in this way," said Norster.
"Gareth has overcome a number of serious injuries over the course of his impressive career, but this most recent injury has really caused tremendous frustration not to mention significant pain for the player that prevents his successful return to competitive action.
"Naturally, on behalf of everyone associated with the Blues I thank Gareth for his efforts for the team and wish him every success in his future career."