A man in his early 20s was found by arriving police with injuries to his neck, chest and leg after the shooting at Blacktown in western Sydney about midday on Friday.
He was treated by paramedics but died at the scene, police say.
The shooting occurred on Carinya Street, less than 500 metres from Blacktown police station and a block from the heart of the bustling suburb.
Officers were on the scene in seconds, NSW Police Superintendent Brendan Gorman told reporters.
"Police heard the shots being fired and responded immediately," he said.
A ute was spotted leaving the scene of the shooting, triggering a five-minute pursuit by police.
It crashed on Kildare Road less than a kilometre away.
Two men inside the ute, one in his late teens and the other in his early twenties, tried to run but were arrested, police allege.
Another car was seen on its roof but no further injuries were reported.
Supt Gorman would not confirm whether the shooting is believed to be part of an ongoing escalation of Sydney's gang violence.
"All I can tell you, as it's the early stages of the investigation, is both the people in custody and also the victim are known to police," he said.
Sydney has experienced more than a dozen public shootings, arson attacks and kidnappings since Christmas 2024, leading police to set up the 150 officer-strong Taskforce Falcon in May to crush the underworld warfare.
Two men were charged with murder on November 5 after the gangland assassination of plumber John Versace outside his Condell Park family home in May.
A live grenade and a sledgehammer were seized after a shooting at a home in Tallawong in the city's northwest in the early hours of Thursday morning.
Six people have also been charged after a drive-by shooting in the southwest suburb of Bossley Park last week, where an automatic pistol was recovered.