The 28-year-old world champion ruptured her Achilles in December but it was her calf that was unable to take the strain of her first major heptathlon since, as she pulled up during the 200 metres.
She was sitting in fifth place after three events before disaster struck with around 100m to go in the 200m race.
She snubbed a wheelchair and treatment on the track to limp to the finish line but was disqualified for rolling out of her lane when she fell.
UK Athletics later put out a statement confirming the athlete had withdrawn.
Posting on Twitter and Instagram, the world champion said she was "going to take some time to process and heal my body and spirit".
Johnson-Thompson wrote about the mental and physical challenges she faced during the pandemic when her Achilles ruptured.
She wrote: "I started the year in a wheelchair and I was not willing to end my Olympic campaign the same way.
"To make it to the line was a miracle.
"To not only do that, but to be on my way to putting a decent score together, is heartbreaking.
"I truly believed I was capable of winning a medal despite having up to half a year of missed training.
"More than ever, I am proud that I showed up, put myself out there and tried.
"It would have been very easy to shy away and pull out, to say I wasn't ready and blame the injury but I'm not that type of athlete or person.
"I am a fighter, I'm gritty AF and I find it extremely hard to give up. I can rest easy knowing I applied myself every single day and pushed until I couldn't push anymore."
She added: "I've lost heart knowing that the work my team and I have done for the last eight months was for this outcome and I hate that my story has played out in more heartbreak.
"I've been knocked so many times and got back up, but it will take a lot of time for me to process this reality."
The Olympics was due to be her first full heptathlon since winning the world title in Doha in 2019.
Her disqualification left her last and 1,082 points behind overnight leader Anouk Vetter.
Johnson-Thompson dropped to fifth after the shot put, her first event, and was 139 points adrift of Nafissatou Thiam, although only 45 off Noor Vidts in third.
She had opened the morning with a strong 100m hurdles winning her heat in 13.27 seconds – her second fastest time ever.
In the high jump, she cleared 1.86m – 12cm off her personal best – and failed at 1.89m to leave her with 2,138 points.