The A6091 at Borders General Hospital will be closed each night from 8pm to 6am from Monday, July 1 until Saturday, July 6.
This is to allow for £193,000 road maintenance works and will benefit the 14,000 vehicles on the route each day.
Diversions will be in place with eastbound traffic re-routed via Kingsknowes roundabout onto the A7 towards St Boswells before joining the northbound A68 towards Ravenswood Roundabout.
Westbound traffic will follow the same diversion in the opposite direction.
Access to Melrose will be maintained from the east via the A6091 to B6361 Main Street.
A separate diversion will be in place for westbound traffic to access the hospital by taking the B6360 (off the A68), then using the B6374 and B6394.
Access to the Borders General Hospital will be maintained from Melrose roundabout and emergency services vehicles will be able to pass through the roadworks,
This scheme has been planned in consultation with Transport Scotland, Traffic Scotland, the emergency services, Borders Buses, Borders General Hospital and Scottish Borders Council.