The pop star-turned-vicar will play a vicar officiating a wedding ceremony between two as-yet unknown characters in the long-running BBC One medical drama.
Rev Coles said: "Thrilled to be invited finally to exercise my ministry of healing at Holby City, which has been my healthcare provider of choice for 20 years.
He added, referring to the villainous character played by Paul McGann: "And to officiate at an occasion so joyous even the late Professor Gaskell would have cracked a smile."
Rev Coles, 56, is best known as one half of pop duo The Communards, who had 1980s hits including Don't Leave Me This Way and Never Can Say Goodbye, and in 2017 he appeared in Strictly Come Dancing.
He will join other confirmed guest stars Gemma Oaten, Amanda Henderson and Jenny Howe in the special episode on December 11.
Storyline details are scant, but Simon Harper, executive producer of Holby City and Casualty, said: "After a dark year for the hospital, Holby is now revving up for Christmas and 2019 in this joyous episode celebrating love and commitment in all their diverse forms.
"As to which Holby couple ends up actually tying the knot, I couldn't possibly divulge, but I can say it's an incredible honour to have the iconic Reverend Richard officiating."
Further guest stars will be announced for the episode, the BBC said.
Stay up to date with the latest news stories from a Christian perspective. Sign up to our daily newsletter and receive more stories like this straight to your inbox every morning.