Police received a call at 8pm about a man behaving in a threatening manner in a courtyard on Slöjdgatan.
“When the police arrived the man started to attack them. They shot in order to repel the attack,” said police spokesman Calle Persson.
The man, who lives in Malmö and is known to the police, was taken to Malmö University Hospital to be treated for his injuries.
“They are not life-threatening as far as I am aware,” said Persson.
The police would not reveal whether the man had been shot more than once.
The 21-year-old is under arrest for threatening a police officer.