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."
James ended up being rushed to hospital and having his gallbladder - a small organ in your stomach that stores bile and helps break down the fat in your food - removed.
According to the NHS, you don't need a gallbladder so it's better to have it removed if it causes you problems.
But the surgery and his subsequent recovery meant the rest of his European tour had to be postponed - and the US tour that was meant to follow has also been postponed until after lockdown ends.
"Thankfully" for his fans, James was able to complete his scheduled dates in the UK and Ireland before the coronavirus lockdown started.
"I did manage to do my arena tour, but it took a month of intensive therapy for me to get right to get back on stage. So yeah, it was a bit of a mad time," he tells Newsbeat.
James is now OK and says he's enjoying having a rest, playing FIFA and writing music at home.
"I'm absolutely fine. After the surgery I'd recovered within a couple of weeks but I just thought I needed to take a bit of time for myself. I'd obviously been burning the candle too much."