Semi-final opponent Nick Kyrgios will receive a walkover into Sunday’s final, where he will play either top seed and six-time champion Novak Djokovic or Britain’s Cameron Norrie.
Nadal, a 22-time Grand Slam champion, struggled with the injury in a gruelling five-set win against 11th-seeded American Taylor Fritz on Wednesday.
Spanish sports daily Marca reported on Thursday that Nadal has a “seven-millimetre” tear to his abdomen but had still intended to play.
But the 36-year-old scheduled a press conference at which he confirmed he was withdrawing.
“I have to pull out of the tournament. As everybody saw yesterday I have been suffering with the pain in the abdominal area,” he said.
“I have a tear in the muscle.”
Nadal, the second seed, was visibly in pain during his match with Fritz and was forced to take a medical time-out in the second set.
But he returned to the court and twice recovered from a set down to win 3-6, 7-5, 3-6, 7-5, 7/6 (10/4) in four hours and 21 minutes.