Daniel Skelton from Bellshill had been treated in Edinburgh for injuries sustained in the early hours of Saturday August 1 in Queensberry Street, Dumfries.
Speaking on Friday, Detective Chief Inspector Colin Burnie of Police Scotland in Dumfries said: “Sadly the victim died at the Western Infirmary in Edinburgh in the early hours of today and as such this is now a murder enquiry.
“The Procurator Fiscal has been notified and a post mortem examination is being arranged.”
A 24-year-old man from Dumfries appeared at Dumfries Sheriff Court on Tuesday August 4 on a petition relating to this incident.