Dyer, who first found fame on Love Island, was paired with professional dancer Nikita Kuzmin on the launch show.
She said: "I had a fall on Friday in rehearsals and landed funny.
"I thought I had rolled my foot but it swelled up badly over the weekend and after an MRI scan yesterday, it turns out I have fractured my ankle.
"Apparently doing the quickstep on a fracture is not advisable (!!) and the doctors have said I am not allowed to dance so l've had to pull out of the show."
She added: "I am so going to miss dancing with Nikita but will of course be watching closely and cheering all the couples on."
Dyer also posted a tearful video on Instagram, in which she said she was "heartbroken" and "absolutely gutted" at having to leave the show.
"I was having the best time ever.
"It's a very, very annoying, devastating thing that I'm going through right now," she said, adding that she was going to take some time off social media.