Chérif Chekatt had been on the run since Tuesday after the attack, which also left 13 people injured.
He was killed after a police operation was launched in the Neudorf-Meinau area of the French city at about 9pm local time.
French interior minister Christophe told reporters three police officers came across a man they believed to be Chekatt and went to arrest him. He was understood to be hiding in a warehouse.
Far better this way than a lengthy trial and a short jail time, as is the usual European custom.