Police received a report about a raging stab near a shopping center in the southern city of Hedland on Friday morning.
The suspect, in his early 30s, armed with a large knife, is believed to have first attacked a man sitting in a vehicle, before entering the mall.
He then cut another six people inside the place, as well as two police officers.
One of the victims was a young woman, who was stabbed while pushing a baby in a stroller.
The attacker was intercepted by two officers and ordered to drop the knife several times, before one fired several shots and killed him, said Western Australian Police Commissioner Chris Dawson.
Dawson said one of his officers “managed to save himself from serious injury” in what the police described as “dangerous and confrontational fighting”.
“That is very dangerous [situation]. And the actions and firmness of these two officers, I believe, do not cause anyone else further injury, “Dawson said.
David J Derschow told CNN that his girlfriend Esther Brooks was injured in the attack.
“I began to hear screams coming from the entrance where he was [was supposed] to get out of and I went to see if he was [safe] but people and children where run out, “he said.
“I saw my partner walking out. I asked what had happened and he only asked if he had been stabbed and was quite sure he was right.”
Brooks was taken to hospital and then dismissed after receiving stitches. Since then he gave a statement to the police.
Police said the attack was not believed to be politically or ideologically motivated.