The man was shot inside an apartment in Vasastan, a central distict in the north of the capital, Stockholm police said.
He was taken to hospital to be treated for serious injuries, but later died.
Police were alerted to the shooting shortly before 5am on Friday.
“It was a person inside the apartment who contacted police,” a police spokesperson told TT. “Right now we're speaking to people in the area to get more information on what happened.”
Police cordoned off the apartment and carried out a forensic examination. They have now launched a preliminary murder investigation.
No one has yet been arrested in connection with the shooting.
READ ALSO: In figures: 2017's shootings in Sweden