Two men have been killed in a single-vehicle crash at Grafton early this morning.

About 12.55am, a Holden Barina was travelling west on Bacon Street when the driver lost control of the vehicle and crashed into a tree.

The driver, a 20-year-old P-plater, was ejected from the car while his 18-year-old passenger was trapped inside the vehicle.

A number of nearby residents heard the crash and went to the scene where they rendered aid to the two men before police arrived and commenced CPR.

NSW Ambulance Paramedics, NSW Fire Brigades officers and State Emergency Service volunteers also attended the crash and despite all efforts by emergency workers both men died at the scene.

A crime scene was established and examined by specialist crime scene officers.

Investigations into the circumstances surrounding the crash continue and a report will be prepared for the information of the Coroner.