Horsfield, 34, spent the second half of last season on loan at the Iron from Sheffield United.
He was released by the Blades in the summer, and had trials with Cheltenham Town and Walsall in a bid to remain in the game.
But he has called time on his professional career after finding out last week he has cancer.
"I was diagnosed last Friday and I'm going in for surgery next Thursday. The surgeon has told me that this is the end of my professional career, which is disappointing," he told the Daily Mirror.
"I've had 10 good years with Fulham, Birmingham, Wigan, West Brom and all the other clubs I've played for and enjoyed it. That's at the back of my mind now. It's just one of those things and I've come to terms with my career being over.
"All I'm thinking about now is beating this. I've always been a fighter right through my football career and I'm going to fight this and win."