The teenager, who has the rare heart condition long QT syndrome, visited a new young heart patient's room which had been redecorated thanks to the Children's Heart Federation in partnership with the Evelina Children's Heart Organisation.
He also met patients who had been supported by the charity and performed his favourite songs from X Factor.
Nicholas, 17, who was runner-up in the latest series of the ITV talent show, is determined to show young people that their condition should not hold them back in life.
Nicholas nearly died after having a heart attack playing football, aged eight, due to his condition.
He said: "A heart defect should not hold any young person back from going for their dreams and living a normal life.
"I'm so pleased to be supporting the Children's Heart Federation, a wonderful charity which has helped many young people to cope with their heart conditions across the UK.
"I really enjoyed visiting the teenagers who were so positive."
Anne Keatley-Clarke, chief executive of the Children's Heart Federation, said: "Nicholas' visit has truly inspired the young people with heart conditions and their families who we support. We are very grateful for the hours Nicholas spent meeting them and giving a wonderful performance at the hospital, which touched us all. We wish him the best of luck in his future career.
"We would to encourage any young person with a heart condition who needs support and wants to meet others like them, to sign up to CHF's BrightHearts young person's forum"
The forum is designed for 13 to 21 year olds and is available at www.chfed.org.uk/brighthearts.