A young man was "angry at the world" when he allegedly shot and injured a Protective Service Officer with a toy gun at a Melbourne railway station.

Nathan Lloyd-Gosbell, 22, is charged with firing a battery-powered mechanical handgun filled with gel pellets at two officers patrolling Highett station early on Wednesday morning, striking one them in the temple.

He did not apply for bail at Moorabbin Magistrates Court charged with eight counts of possessing handguns without a licence, assault and reckless conduct endangering serious injury.

Mr Lloyd-Gosbell earlier told police he shot at the PSOs because he was "angry at the world", Sergeant Alistair Boyd said in a statement tendered to the court .