But having worked on rehabilitation at both London Irish and Spire Murrayfield Hospital in Edinburgh under the direction of Scotland's head of medical services James Robson, he has been advised to retire on medical grounds.
"It's with great sadness that I announce my retirement from professional rugby," said Ansbro.
"I've been fortunate enough to play top-level rugby for both Northampton Saints and London Irish. To gain international recognition with Scotland has been an immense honour; victories over South Africa and Australia stand out.
"Playing this great game at the highest level is a privilege and I will always look back on my career with fond memories.
"Thank you also to all the supporters, players, coaches and staff at Scottish Rugby for making the responsibility of representing Scotland such an enjoyable experience.
"I'd especially like to thank James Peckitt (London Irish physiotherapist) and Doctor James Robson for helping me through a difficult rehabilitation process.
"Finally, thank you to my family, friends and agent for their continuing support and positive influence."
Ansbro made his debut for Scotland in the victory over South Africa in November 2010 and was a key part of their 2011 World Cup squad.
He has played an important role in last summer's tour of Australasia which saw Scotland defeat the Wallabies and Samoa - the latter of which proved to be Ansbro's last game and he scored a try in a 17-16 win.
Scotland captain Kelly Brown said: "Joe has been a truly talented rugby player and an all-round good guy. I'm sure we'll miss him but, equally, I'm delighted that he'll be able to get on with normal life outside rugby. Good luck Joe."