Swansea Council leader, Rob Stewart highlighted the work being carried out by the South Wales Trunk Road Agent (SWWTRA) on social media.
SWWTRA, who manage South Wales’ motorways and trunk roads, say the bridge located on Heol Maes Eglwys Road in Cwmrhydyceirw, will be closed to pedestrians from 7 July and then to all traffic from 18 July until 29 August.
A spokesperson from SWWTRA said: “Shortly essential upcoming works to refurbish the M4 Maes Y Gwernen overbridge, located on Heol Maes Eglwys Road in Morriston, Swansea will begin.
“The works will be carried out by Centregreat Ltd on behalf of the South Wales Trunk Road Agent, acting as Agent for the Welsh Government.
“The bridge will undergo a full bridge deck refurbishment that includes a new deck waterproofing system and carriageway resurfacing.
“To undertake these works, we will need to close the bridge for a six-week period over the school summer holidays.
“Unfortunately, due to the nature of the works it will not be possible to carry out the refurbishment under lane closures.
“Whilst some noise disturbance and disruption can unfortunately be expected, every effort will be made to minimise any inconvenience caused.
“All alternative traffic and pedestrian routes will be clearly signed around the closure with further information available via our Traffic Wales website.”
The work will be carried out in two phases, with the first starting on 7 July, will see the removal of the existing footpath and traffic barrier kerb line. The structure will remain open to traffic, although pedestrians will be diverted.
The second phase starts on 18 July to fully refurbish the bridge deck, including re-waterproofing and resurfacing. The bridge will be closed to both vehicles and pedestrians for 6 weeks, commencing 8pm on the last day of school term (18 July).
Motorway traffic on the north side of the bridge will be diverted via Heol Maes Eglwys to Pant Lasau Road, then join the M4 at junction 46 (Llangyfelach Interchange).
Motorway traffic on the south side of the bridge will be diverted via Llanllienwen Road, then join the M4 at junction 45 (Ynysforgan Interchange).
Local traffic on the north side of the bridge will be diverted via Heol Maes Eglwys to Pant Lasau Road, then join the A48 and A4067 southbound. At the Ynysforgan Interchange, exit via Llanllienwen Road.
Local traffic on the south side of the bridge will be diverted via Llanllienwen Road, then take A4067 southbound to join the A48. Use Pant Lasau Road to reach local destinations on the north side.
The bridge is on a number of popular bus routes, including services 4, 4A, 24, 45, 46 and 142.
Swansea Bay News has contacted local bus companies to ask them what arrangements they are putting in place while the bridge closure is in effect.

Staff and patients at Morriston are desperately waiting for an answer re buses. Many will simply not be able to get to the hospital without a bus service.
The children don’t break up until the 18th of July. If the bridge is closed to pedestrians from the 7th how are both schools going to manage?
The 4a bus service is remaining the same as far as the dears leap bus stop , then stating it’s return journey route back to swansea from the leap ? So it’s been announced, a shuttle bus service will begin from the dears leap to morriston hospital and back to the leap when the bridge closes brilliant actions taken. But has anyone had thoughts of how oap’s and others are going to resume Thayer journeys from parc gwernfadog to morriston or swansea or are these people expected to walk with bags/shopping from the north side of the bridge up to the blue footbridge between j45/46 back down the other side to the to the south side to pick the 4a bus up at the dears leap , or is this temporary shuttle bus going to incorporate Thayer needs. Kind regards clive.