A Queensland supporter who shot and killed a New South Wales fan after the pair got into a fight while watching a State of Origin game two years ago has pleaded guilty to murder.

Jed Coates, from Sydney, and Matthew Perry were watching the match at the Colyton Hotel, near Mt Druitt, west of Sydney, when they started arguing.

The court heard the two men knew one another from school.

Mr Coates, 18, and another man he had been drinking with, were ejected from the hotel and later confronted Perry at his home on nearby Nevada Avenue, Colyton.

Brandishing a rifle, Perry then fired a single shot at Mr Coates, who was hit in the neck.

Reports at the time said Mr Coates was holding a shovel and had shouted, "shoot me, shoot me".

He later died at Westmead Hospital.

Perry's trial was due to start this week but before a jury was empanelled he pleaded guilty to murder.

Relatives of the victim, including his mother Julie Lowe, were in court for the plea.

The case will return to court on Friday for the start of sentencing proceedings.

At the time police said the pub fight was what sparked the shooting, but Detective Inspector Barry Vincent said it was unclear what the pair was fighting over.

Mr Coates had celebrated his 18th birthday with his twin brother, Sam, less than two weeks ago and the trip to watch the State of Origin was his first time legally drinking at the local pub.

Sam posted a tribute on his Facebook saying: "RIP Jed, my brother, my twin, your [sic] a king in my eyes, love you bro".