A man has been charged with shooting a man in the kneecap in Melbourne's west on Tuesday morning.

The 26-year-old allegedly fired a shotgun at the 30-year-old victim inside a unit on McLennan Street, Braybrook, at 7.25am on Tuesday.

A man was left in a serious condition after a shooting in Braybrook.

The Braybrook man was arrested later that day and on Tuesday night was charged with intentionally causing serious injury, possessing a firearm, using a firearm, and committing an indictable offence while on bail.

A Victoria Police spokeswoman said the man faced an out-of-sessions hearing on Tuesday night and was remanded in custody to appear at Sunshine Magistrates Court on Wednesday.

The spokeswoman said a second man was also arrested during the course of their investigation and both men will be charged over a number of unrelated maters, including being a prohibited person possessing a firearm, and drug possession.