Police sources said the officer sustained minor neck injuries in the assault, which comes with France on high alert after jihadists killed seven people in London on Saturday.
Documents found on the attacker identified him as a 40-year-old Algerian who was a doctoral student in information science at a university in the east of France.
The suspect later claimed to be a "soldier of the caliphate" of the Islamic State group, according to a source close to the investigation.
The policeman’s colleague opened fire on the man, hitting him in the chest in panicked scenes around the Gothic cathedral that is one of France’s most visited tourist attractions.
The man lay bleeding on the ground as police sealed off the area and searched for possible accomplices.
About an hour after the attack he was taken to hospital and police declared the situation to be under control.
Interior Minister Gerard Collomb said the man, who was also carrying kitchen knives, had shouted "this is for Syria" as he lunged at the officer.
Anti-terrorist prosecutors were put in charge of the investigation.
A witness said 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.
On Tuesday evening a group of 15 heavily armed elite police officers searched student accommodation in the suburbs of Paris, where the suspect rented a studio, a journalist said.
A tenant of the building described him as "very quiet".
The suspect’s thesis director at the University of Lorraine, where he enrolled in 2014, said the doctoral student showed "no outward sign of an excessive adherence to Islam."
"When I knew him, he had a pro-Western, pro-democratic outlook," Arnaud Mercier, who said he had not heard from the suspect since November, told the French television chain BFMTV.
Notre Dame, which is situated on the banks of the Seine river in the heart of Paris, draws 13 million visitors a year.
Over 1,000 people were inside the cathedral at the time of the attack.
Authorities in Paris asked the public to stay away from the area.
Pictures on social media showed people sitting in the pews with their hands in the air – apparently at the request of police.
Andre Finot, the cathedral’s head of communications, later described the situation as calm. "People are talking to each other, praying and continuing their visit," he said.
In September, Notre Dame was the scene of a scare after a car full of gas canisters was found parked nearby.
The car was tracked to an all-female terrorist cell, allegedly acting on the orders of Syria-based Islamic State jihadists.
Renewed state of emergency
Tuesday’s incident comes three days after extremists used a van and knives to crush to death and kill seven people enjoying a night out in London. One of the victims was French.
France is still under the state of emergency imposed after the November 2015 attacks in Paris, when Islamic State jihadists killed 130 people in a night of carnage at venues across the city.
The last fatal attack in France dates to April 20, when a policeman was shot dead on Paris’s prestigious Champs-Elysees avenue, three days before the first round of the presidential election.
Previous major attacks targeted the Charlie Hebdo satirical magazine in January 2015 and in November that year, gunmen and suicide bombers attacked venues around Paris including the Bataclan concert hall, killing 130 people.
Then in July last year, a radicalised Tunisian man drove a lorry at high speed through a Bastille Day fireworks display on the Nice waterfront, massacring 86 people.
Since then there have been a series of smaller attacks, often targeting security forces.