More than 700 French security forces had been hunting for 29-year-old Cherif Chekatt since the bloodshed on Tuesday night.
French police on Thursday shot dead a gunman who had been on the run since killing three people at Strasbourg's popular Christmas market.
He was believed to have been injured after exchanging fire with soldiers during the attack, but managed to escape and had not been seen since getting out of a taxi in the Neudorf area of the northern French city.
Minutes before he was shot dead on Thursday, a helicopter with a powerful searchlight flew over Neudorf.
Interior Minister Christophe Castaner told reporters police swooped after the suspect was spotted in the street.
Officers tried to arrest him, but he shot at police. "They immediately returned fire and neutralized the assailant," Castaner said.
Dozens of police vehicles converged on the area where police were applauded after the shooting.
Police in several other countries earlier joined the manhunt for Chekatt, a Strasbourg native and career criminal with at least 27 convictions in four European states.
A fifth person was detained by police for questioning on Thursday, in addition to the suspect's parents and two brothers who have been in custody since Wednesday.
The Strasbourg Christmas market is due to reopen on Friday.
As police were hunting Chekatt Thursday, the French government urged "yellow vest" protesters not to hold another round of demonstrations this weekend, given the strain on the country's security forces.
The "yellow vest" protesters, known for their fluorescent high-visibility jackets, had called for a fifth round of protests this Saturday.
The protests began on November 17 over fuel tax increases, but snowballed into a revolt over living standards as well as Macron's perceived indifference to the problems of ordinary citizens.
The Strasbourg suspect, who lived in a rundown apartment block a short drive from the city center, was flagged by French security forces in 2015 as a possible Islamic State group worshiper.
Hours after Chekatt's demise, ISIS claimed responsibility for the terror attack with the Mirror reporting that the terrorist organization said "Chekatt was a 'soldier of the group', although they did not provide any evidence."