Sheeran, 24, took to Twitter to share his inclusion at the event, reported Billboard.
"I know I said Wembley was my last UK show of this tour but my mate had a cancellation on his festival so I'm filling in last minute."
The concert benefits the Prince's Trust youth charity.
Bieber, 21, announced cancelling his August 28 performance at the festival earlier this week.
Festival organiser, Mike Owen, said Sheeran's setting up to fill in for Bieber's headlining set on the first night of the three-day festival nearly brought him to tears.
Upon his cancellation, Bieber apologised to his UK fans and promised to make it up to them. He said, "I look forward to the opportunity to give my UK beliebers a great show in the future.