The two-time Olympic gold medallist made the announcement on social media, saying he would also not be competing at Wimbledon later this month.
Spain's 13-time Roland Garros champion said the decision was made after "listening to my body," adding:
"The goal is to prolong my career and continue to do what makes me happy, that is to compete at the highest level and keep fighting for those professional and person goals at the maximum level of competition"
Two golds from three Games editions for Nadal
It is not the first time that the Spaniard has withdrawn from the Games.
Nadal made the decision in 2012 not to defend the gold medal he had won in the Beijing 2008 men's singles, due to tendinitis of the knee.
He returned to the Olympic arena for Rio 2016, where he and doubles partner Marc Lopez beat Romani's Florin Mergea and Horia Tecau to clinch the gold medal.
His debut at the Olympics was at Athens 2004, before the first of his 20 grand slam singles titles.
"The Olympic Games always meant a lot and they were always a priority as a Sports person, I found the spirit that every sports person in the world wants to live. I personally had the chance to live 3 of them and had the honor to be the flag bearer for my country."