"Sugar" Shane Mosley, who told ESPN on Tuesday that he is retiring from boxing, said a recent elbow surgery gone awry was the deciding factor.

Mosley, 45, the former three-division world champion and pound-for-pound king, said he hoped to fight until he was 50, like good friend Bernard Hopkins did. However, earlier this year Mosley went for what was supposed to be minor surgery to shave down a bothersome bone spur and remove loose particles from his right elbow, but instead he said he was left with more serious damage.

"Sugar" Shane Mosley won a decision against Oscar De La Hoya in 2000 for the world welterweight title. Al Bello/Getty Images

"I had a few more years left in me and had a few big fights lined up for 2017 and 2018. Hopkins fought up to 50 at the world-class level and he has always been a role model and friend," Mosley told ESPN. "However, fate, if you will, stepped in and took those options away from me earlier this year.

"I went in for a minor arthroscopic surgery to remove a couple loose bone fragments from my elbow and the surgery turned into a whole ordeal after the surgeon admittedly 'accidentally' burned me on my forearm, leading to a sick infection and needing like four or five days of IV antibiotics and two weeks of antibiotics at home. It was crazy and surreal to learn that I could never fight again."

Mosley said the surgery left him with a 3-inch burn on his arm that the "doctor tried to cut out without my knowing and put a half-cast on, and then I got a bad infection, and now my arm won't straighten or bend and it feels like I have a metal plate in it. Been going to physical therapy, but nothing helped.

"My right arm is ruined. They were supposed to make two 2-centimeter incisions in my elbow in a one-hour surgery, and I ended up in there over four hours and came out butchered."

Mosley (49-10-1, 41 KOs) has not boxed since losing a competitive decision to David Avanesyan challenging for an interim welterweight world title in May 2016. Mosley said he still has numbness in his fingers because of the surgery and needs another procedure, "so I know this is the time to announce my retirement."