Police were tipped off shortly after 9pm on Sunday when shots were fired in a residential area in Hässelby Strand, a suburb roughly 20 kilometres north-west of central Stockholm.
A large patrol was sent out, including police helicopters, but police made no arrests.
“I heard the shots and ran out onto the street. We saw a car driving away at furious speeds,” one witness told the Aftonbladet newspaper.
“It sounded like four shots from an automatic weapon,” the witness added.
Police spokesman Lars Byström would not confirm the extent of the injuries sustained by the two men, who are said to be in their twenties, but he added that the pair had been taken to the local hospital. Officers remained on the scene late into Sunday night.
“An investigation into attempted murder has been launched. We’ve cordoned off the crime scene for forensic investigations and to talk to witnesses,” Byström told the paper.
“There have been a number of shots fired recently between rival gangs, but it’s too early to say if there is a connection here.”