The X Factor winner thought he was sick with the flu, but things took a turn for the worse on stage and he tells Radio 1 Newsbeat he's "never been more scared".
James found out he had a gallbladder infection and needed emergency surgery.
After the scare, James says it took a month of "intensive therapy" before he could get back on stage.
"I had really bad anxiety," he tells Newsbeat about performing while he was sick. "I thought I was gonna die on stage, it was weird."