He was treated on the spot by ambulance people before being driven to the hospital in stable condition.
Detectives conducted an extensive search of the area.
A black BMW SUV was located on fire at Nettletree Street, Casula, shortly afterwards, and police are investigating whether it was linked to the shooting.
Another car, a white Subaru, was located burnt out on Morgan Lane, Strathfield at 01.20 this morning and is also under investigation for connections to the shooting.
“The two cars I mentioned are possible links to the incident,” said acting inspector Robert Danks.
Three crime scenes have been established and are being forensically examined.
Acting police inspector Danks said the victim was known to police.
“We think it’s a targeted attack,” he said.
“So there were three gunshot wounds to him, so it looks like they were trying to shoot him.”
Acting Superintendent Danks added that there is a male suspect the police are looking for.
Police have urged anyone with CCTV or dashcam footage of the incidents to report and contact Crime Stoppers on 1800 333 000.