The man, who was armed with a hammer and two knives, shouted "this is for Syria" attacked an officer who was on patrol outside one of the French capital's most visited tourist spots.
After landing a blow on the officer another policeman responded by firing twice at the attacker, who was left injured and lying on the ground. He was later taken to hospital. The policeman sustained minor injuries.
The suspect later claimed to be a "soldier of the caliphate" of the Islamic State group, according to a source close to the investigation.
Counter-terrorism investigators have taken charge of the probe.
Interior Minister Gerard Collomb said the man had shouted "this is for Syria" as he lunged at the officer.
He said the man had also been carrying "kitchen knives" and was found in possession of a card identifying him as an Algerian student.
The shooting prompted scenes of panic at the site that welcomes some 13 million tourists a year. At around 17.30 authorities said the situation was under control.
Several metro stations around the area were closed.
A witness told AFP he heard someone "shout very loudly".
"Then there was a crowd surge and people panicked. I heard two shots and saw a man lying on the ground in a pool of blood," he said.
A witness named David Rahul Matreau told BFM TV: " I heard two shots and then cries of panic. I looked out and see people fleeing. Then I saw a man on the ground with police standing around him.
"There were a lot of tourists there but in a matter of minutes the area outside Notre-Dame was completely cleared," he added.
Some 900 visitors were kept locked inside the cathedral with police not allowing them to leave for their own safety.
Pictures on social media from inside the cathedral showed people sitting down with their hands in the air apparently at the request of police.
We're trapped in Notre-Dame de Paris, something is happening outside. Police sirens can be heard. They are not letting anyone in or out— Matthew CurrieHolmes (@mch2k) June 6, 2017
The area around the historic site has been cleared off people and cordoned off with people advised to stay away from the area.
Initial reports suggest police believe the attacker was acting alone, but a security operation is underway to ensure he had no accomplices.
Police seal off Notre Dame cathedral in Paris amid reports of a shooting. pic.twitter.com/cPRMYD2VAW— Josh Caplan (@joshdcaplan) June 6, 2017
The motive of the man armed with the hammer is unknown but the incident comes as France, like much of Europe is on high alert for terrorism after a spate of recent attacks.
HEAVY police presence around Notre Dame Cathedral where a man supposedly attacked a cop with a hammer & was shot. pic.twitter.com/Frc2Mavu0p— The Rouser (@RouserNews) June 6, 2017
French police have been targeted numerous times by jihadists in recent years including on the symbolic Champs-Elysees avenue in Paris, just days before the first round of the presidential election, when an officer was shot dead.
Notre-Dame was the subject of a failed terrorist attack last September when a car filled with gas canisters was left in a side street.
However attempts to set the car alight failed and three women were arrested in connection with the failed attack.