"Operation Sentinelle" troops spotted the man who was allegedly threatening tourists on the Promenade des Anglais after he attacked a woman near the harbor, the reports said.
The man reportedly resisted security forces and even threatened to cut his own throat during the operation conducted by the soldiers and municipal police.
Security forces were forced to use tear gas in a bid to subdue the attacker. According to France 3, the suspect's motives remain unclear.
Police have launched an investigation, but do not believe the incident is of terrorist nature.
"He has not uttered any threats that would suggest that he acted under the influence of radicalization," Nice Prosecutor Jean-Michel Prêtre said.
The woman has been reportedly receiving treatment for a fractured leg and neck injuries, local sources said.
Operation Sentinelle was launched after a series of terror attacks targeting Paris in 2015. Nice was also hit by a deadly attack in July 2016, when truck plowed through crowds during Bastille Day celebrations on the Promenade des Anglais, leading to the deaths of 86 people.