The 27-year-old attacker, surnamed Mao, attacked the French national on Wednesday after a Chinese national was shot dead in Paris, Shanghai police said.
The victim was slightly injured on his neck.
In response to the incident, the French Consulate in Shanghai issued a warning to its citizens in China, asking them to be on guard.
"Given the situation, the French embassy in China calls on members of the French community to exercise the utmost vigilance," it said in a statement.
More From This Section
The attacker fled the scene, but was caught on the same day, state-run Xinhua news agency reported, adding that an investigation was going on into the incident.
It is not clear whether the attack on the French national was connected to the death of Chinese national in Paris.
Liu, 56-year-old Chinese national and a father of five, was shot dead on Sunday in his apartment by a policeman after a neighbour had called the police to report a domestic dispute, the report said.
However, Liu's daughter said the police had burst through the door and "the shot was gone and my father found himself on the ground," the report said.
The girl said her father was holding the scissors as he had been preparing fish for cooking.
French Interior Minister Matthias Fekl on Tuesday said an inquiry was going on after the shooting, promising full respect for the law "to establish the facts."
Earlier on Tuesday, the Chinese Foreign Ministry called on the French government to ascertain the truth in a quick manner and effectively protect safety and legitimate rights and interests of the Chinese citizens residing in France.