They say the man is a 39-year-old computer worker with a history of psychiatric problems.
Mr Delanoe, who is homosexual, was greeting visitors at an all-night party at City Hall early on Sunday when the attacker stabbed him in the stomach.
The mayor is recovering from minor surgery and will have to spend at least a week in hospital.
The suspect was immediately taken into custody. Officials - who have not disclosed his name - say he has confessed to the stabbing.
They also say he told investigators that he was a devout Muslim and acted "out of hostility towards politicians and homosexuals".
Police say the suspect is not linked to any militant group. He has in the past received psychiatric treatment.
Celebrations must go on
Mr Delanoe, a socialist, is one of France's few openly gay politicians. Following his election last year, he launched a number of cultural initiatives as well as projects to clean up the streets.
The stabbing took place after Mr Delanoe had just returned to City Hall from a tour of museums and other venues as part of the city's "Sleepless Night" celebrations.
Witnesses said the attacker approached Mr Delanoe as he was circulating freely among the crowd.
"The mayor was walking quietly in the Hotel de Ville's reception room when a man threw himself on him without saying anything and stabbed him in the stomach with a knife," the mayor's aide, Anne-Sylvie Schneider, told the French news agency AFP.
Deputy Mayor Christophe Girard said Mr Delanoe had insisted, before being taken to hospital, that the city's festivities should continue.
"He was completely conscious and determined that an isolated incident should not affect what was supposed to be a nice festival of Paris for the Parisians," he said.
Dozens of tourist attractions, including the Eiffel Tower and the Louvre, were free of charge all night, and free concerts and exhibitions were being held around the French capital.
The attack was the second in less than three months against a prominent politician in Paris.
On 14 July, a man tried to shoot President Jacques Chirac as he was reviewing troops at the annual Bastille Day military parade.
Earlier this year, eight local councillors were shot dead by a gunman in the western Paris suburb of Nanterre.