The woman suffered fatal injuries in the incident involving a lorry at Llangyfelach at around 04:00 BST.
The eastbound carriageway of the M4 was closed for several hours resulting in long delays for commuter traffic on Thursday morning.
The road was closed until 09:00 BST causing a five-mile tail back along the M4 eastbround.
A woman reported to have been walking on the slip road of the M4 at Swansea, dies following a collision.