In a statement on Friday, Pele said: "I'm not physically able to attend the opening of the Olympics."
Friday's opening ceremony has a void to fill without Brazil's most famous athlete.
Pele had hip surgery several years ago and often walks with a cane.
"Only God is more important than my health," Pele said. "In my life, I've had fractures, surgeries, pain, hospital stays, victories and defeats. And I've always respected those who admire me."
He said it was "my own decision" and apologized for disappointing Brazilians.
"As a Brazilian, I ask God to bless all who participate in this event,'' he said.
He signed the statement Edson Arantes do Nascimento -- Pele.