Promoters announced that Lewis, fresh off his debut album Divinely Uninspired to a Hellish Extent spending a month at number one, would replace the Northern Irish band on the Sunday of the festival, which will be held again at Glasgow Green from Friday 12 to Sunday 14 July.
Pianist and guitarist Johnny Mcdaid of Snow Patrol is undergoing surgery on his neck, while fellow bandmate Nathan Connolly is still unable to perform due to a long-standing nerve problem.
A statement from the band said: "To replace Johnny it would take at least two people and with Nathan still out with nerve damage (he is slowly on the mend) so he is also still unable to play guitar we feel it’s just not appropriate to continue with shows at this stage. It isn’t just their guitars and pianos that would be missed.
"Their backing vocals are essential to our sound and their energy and spirits are colossal and are irreplaceable forces.
"Am sure you all understand that at this point the most important thing is to take time to let our brothers heal and recover so we need to cancel the forthcoming shows we are billed to play in Europe this summer."
Lewis Capaldi, who is well known for his powerful vocals as well as his comedic antics on social media, has built up a huge following even in the 12 months since he last played TRNSMT as one of the warm-up acts on the main stage.
He will now receive second-billing behind headliner George Ezra and will play to tens of thousands of adoring fans on Glasgow Green.
Festival Director Geoff Ellis said: “We are very sorry to hear about Johnny and Nathan and we completely understand that this means they can no longer play at this year’s TRNSMT Festival. We send our best wishes to them both for a speedy recovery.
"Whilst this is sad news, we are able to confirm that Scotland’s hottest new global export, Lewis Capaldi will join the line-up in place of Snow Patrol, and we look forward to seeing him bring his Number One album to the Main Stage. He’s had an outstanding year and we can’t wait to welcome him back to TRNSMT for what I’m sure will be an incredible performance.”
Stormzy and Catfish and the Bottlemen are among the other headliners for the festival, which is in its third year.