The 11-time Grand Slam champion was chosen on Wednesday by the Spanish Olympic Committee to lead the team at the opening ceremony on July 27.
"For me the chance to carry the flag representing all the Spanish athletes in London is a true honor," Nadal said in a statement. "I think carrying the flag will be one of the most moving moments of my entire career.
"I can only say thanks and wish my fellow athletes the best of luck."
The Mallorca native is a national figure in Spain and arguably the best clay-court player of all time. Earlier this month, Nadal won the record seventh French Open title after beating top-ranked Novak Djokovic in the final.
The London Games will be Nadal's third Olympics.
The tennis events run from July 28 to Aug. 5 on Wimbledon's grass courts.
Last week, Russia's sports minister said French Open champion Maria Sharapova is among contenders to carry the Russian Olympic team flag at the London Games. Djokovic was also in line to lead Serbia's team in the opening ceremony.