TWO men have been charged over a shooting incident in Sydney's west that left a man under police guard in a Sydney hospital.

Police were called to a house in Castlereagh, near Penrith, shortly before midnight (AEST) on Wednesday following reports of gunfire.

A 23-year-old Chipping Norton man found with multiple gunshot wounds in the back was taken to hospital, where he was arrested and placed under police guard.

Three other men, including the owner of the house, were also arrested.

Police said on Thursday that two of those men, a 26-year-old from Pemulway and a 31-year-old from Pendle Hill, were charged with special aggravated break and enter with intent.

They were refused bail ahead of an appearance at Penrith Local Court.

The 37-year-old owner of the house has been released pending further inquiries.

In a separate incident on Wednesday night, a man was shot in the arm while travelling in a car in Sydney's southwest.

Several shots were fired from a car at Edensor Park into another car about 9pm, hitting the man who police believe was deliberately targeted.

Originally published as Two charged over Sydney shooting