The articulated lorry was loaded with various types of fruit and vegetables and was heading west on the road when the accident happened near Mouswaldbank, about four miles from Dumfries.
Emergency services were called to the crash around 7.30am and the driver was treated at the scene before being transferred by ambulance to Dumfries Infirmary.
He is believed to be suffering from a neck injury as well as bruising and shock, but his injuries are not thought to be life-threatening.
The lorry went down an embankment before coming to rest in the trees. Traffic was delayed for some time while debris was cleared from the road.