Andrew Jardine, 19, was struck by a blue Mercedes around 5.30am today on the A709 between Dumfries and Lockerbie close to the entrance of the Lochar Moss recycling site.
Mr Jardine, from Dumfries, was taken to Dumfries and Galloway Royal Infirmary but died a short time later.
The driver of the car was uninjured and stopped to help the teenager, police said.
Officers are investigating the scene of the crash and are appealing for any witnesses who saw Mr Jardine or the car around the time of the collision.
They are also trying to trace his movements and want to speak to anyone he had been with on Saturday night.
Anyone with information should contact police on the non emergency 101 number.