The singer has signed up to appear in Tommy at the Prince Edward Theatre on Old Compton Street for a one-off appearance on November 12.
The musical, penned by The Who frontman Pete Townshend, has ticket prices ranging from £15 to £65.
"I'm very excited to make my West End debut in the iconic rock opera Tommy," McElderry said. "I have been waiting for a role that would challenge both my acting and singing skills, this has both.
"I am a big fan of The Who and it is incredible that Pete Townshend wrote this piece when he was 21, the same age as me."
McElderry recently reached number eight on the UK album chart with his latest record Here's What I Believe, which was released last month.
Digital Spy breakfast show - watch Anna Williamson discuss the day's biggest stories including X Factor, James Bond and Justin Timberlake: