A man is dead and another injured after a targeted early-morning shooting at a Western Sydney apartment complex.

Two men have been charged with murder after a gangland shooting in Sydney's west. (Sitthixay Ditthavong/AAP PHOTOS)Two men have been charged with murder after a gangland shooting in Sydney’s west. (Sitthixay Ditthavong/AAP PHOTOS) Credit: AAP

Two men have been charged with murder following a suspected gangland-style shooting at an apartment complex in Sydney’s west that left one man dead and another injured.

Emergency services were called to a unit in Lidcombe about 4am on Monday after reports of a shooting.

Police found a 38-year-old man inside the apartment suffering gunshot wounds. He was rushed to the hospital but died a short time later. A second man was also located at the scene with injuries that were not considered life-threatening.

Later that afternoon, officers arrested a 21-year-old man after a car crashed into a parked vehicle. NSW Police said a firearm was discovered inside the car.

The man was taken into custody and charged with murder as well as wounding a person with intent to cause grievous bodily harm.

Detectives later carried out a raid at a home on Spurway Street in Ermington, near Lidcombe, about 8pm, where a 22-year-old man was arrested and also charged with murder.

Both men were refused bail and are due to appear before Burwood Local Court on Tuesday.

Police had earlier said the shooting appeared to be linked to organised crime and was not a random act.

“This is a targeted attack. This is not a random attack,” Superintendent Robert Toynton told reporters.