The authorities were alerted to the presence of someone brandishing a knife at the building in Söderkulla in the Fosie district of Malmö early on Thursday morning.
Other people were understood to have been in the apartment with the man, though a hostage situation was ruled out, according to police press officer Calle Persson.
“The investigation will show what happened,” he told news agency TT.
“The police officer or officers that fired shots will be spoken to, and a technical investigation of the crime scene will also be carried out,” he added.
Southern Swedish newspaper Sydsvenskan reported that the suspect had locked himself into the apartment, and the shots were fired once the police stormed the building.
“He had locked himself into the apartment, and in relation to that the officers were forced to fire their weapons,” Maya Forstenius, who is a spokesperson for the police in the south of Sweden, told Sydsvenskan.
The man, who is between 20 to 25 years old, was taken to hospital with what was initially believed to be life-threatening injuries. However, hospital staff later said he had only received minor injuries.
“Despite having multiple gun wounds he is now considered to be minorly injured,” said Anna-Lena Boive, press spokesperson for Skåne University Hospital.