The man is understood to have made his own way to the accident and emergency ward at Skåne University hospital in Malmö in the early hours of Wednesday morning.
Police told the TT news agency that his injuries were serious but not life threatening and said that they had launched an attempted murder investigation.
Officers added that it was unclear exactly where in the city the shooting had taken place, but that they believed it had happened outside.
“We’ll see when we question him more thoroughly if we can determine where he has been,” Magnus Lefèvre, a duty officer for Skåne police, told TT.
He said that there were no available witnesses and that officers were not pursuing any particular suspect for the attack.
READ ALSO: Malmö police worry about wave of violence
The shooting comes in the wake of a wave of summer violence in Sweden’s third largest urban centre including shootings, explosions, hand grenades being thrown and cars and buildings set on fire.
Some of Malmö’s inner-city areas and suburbs have a reputation for gun and gang-related crimes as well as race-related violence between different immigrant groups.
As a result, police announced last month that they were stepping up their presence in known trouble-hit areas such as Rosengård and Seved, where around 30 people believed to be from criminal backgrounds are being tracked by officers.