Three Scottish Fire and Rescue crews were called to the scene after the accident which involved a van, four-by-four and trailer loaded with wool and a car.
It happened near Park of Tongland, about three miles from Kirkcudbright and completely blocked the road.
Firefighters used cutting equipment to free the two men in the seven-tonne van.
They were taken 25 miles by ambulance to Dumfries and Galloway Royal Infirmary.
The road was closed for several hours after the accident to allow police to carry out an accident investigation.
The condition of the two men is not thought to be life-threatening.
The drivers of the other vehicles were unhurt.
NEWSDESK: 01461-202417