The interior ministry said the "attempted assassination" was being treated as a terror attack, amid the country's continuing state of emergency.
The soldier opened fire in self defence near the Carrousel du Louvre shopping centre at around 10am local time (9am GMT), police said.
Michel Cadot, the head of Paris police, said the man was shouting "Allahu akbar" and injured the soldier's scalp.
The shot the attacker five times in self defence, hitting the man in the stomach, Mr Cadot added.
He was seriously injured in the incident at around 10am local time (9am GMT) and is being given medical treatment.
Bomb squads were deployed to check the area for safety but found no explosives in two backpacks the attacker was carrying.
The Paris public prosecutor's office said the incident was being investigated as an "attempted assassination connected with a terrorist enterprise and association with terrorist criminals".
A spokesperson for the French interior ministry said a "serious public security incident" was underway, saying security forces were at the scene.
The ministry urged people not to spread "false information" and to follow authorities' instructions.
An American tourist visiting Le Louvre described how sirens sounded before emergency escape doors lifted from the ground.
“Four armed guards then sprinted around the grounds outside of the pyramid entrance looking for something,” he wrote on Twitter.
Hundreds of people were evacuated from Le Louvre art gallery, Carrousel du Loure shopping centre and surrounding gardens.
It came following a series of Isis-inspired terror attacks in France, with the group calling on its followers to attack "infidels" and members of the security services.
The group killed 130 people in a series of shootings and bombings in November 2015, and its followers have killed shoppers at a Kosher supermarket, a police officer and his wife and a Catholic priest.