Scharner, 33, has stepped away from the game to focus on family life after falling out of favour at the Bundesliga club.
The Austria international – who played at Wigan Athletic and West Brom in the Premier League – joined Hamburg in July 2012, but made just four appearances for the club.
He was sent on loan to Wigan last season but upon returning to Germany, found himself training with the reserves and told he would not have a future at the club.
Scharner came to an agreement with Hamburg, departing by mutual consent, before posting a retirement message on his official Twitter account.
"The end! Thank you for all your support. Bye bye," Scharner's message said.
Scharner's retirement comes just one day after he blasted Hamburg, citing a lack of philosophy and chances for him.
"Hamburg had to pay for their mistakes (in relation to Scharner's payout)," he said.
"From day one, Hamburg had been a disappointment for me. I was never offered a chance.
"Moreover, the club has no philosophy."
Scharner also said that he was growing frustrated with football at the top level, claiming Real Madrid's world-record move to Real Madrid was "wrong".
"Top-level football is no longer about football. It's only business. To pay €100million for one player is just wrong," he said.
"Real characters are no longer in demand."
Scharner's career began at Austria Vienna, while he also spent stints at Red Bull Salzburg and Brann before arriving in England.
The defender will bow out in style, having won the FA Cup with Wigan last season.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.