A shot has been fired into a service station during an attempted robbery on NSW's south coast.

The 35-year-old service station attendant walked outside the shop on the Princes Highway, Tomerong, to begin packing up for the night just after 9pm (AEDT) on Tuesday.

But he ran back inside after spotting a man outside in a light blue coloured zip up jacket and a cream coloured baseball cap carrying a rifle.

The thief, who had his face concealed, began banging on the glass doors with the firearm before firing a shot that narrowly missed the attendant.

He then fled the scene and officers arrived a short time later.

The offender has been described as being about 170cm tall, with a slim build and light brown complexion.