Emergency services were called to the collision at 1.26am after the heavy goods vehicle struck the central barrier.
Hampshire police said the driver suffered only minor injuries in the incident.
The motorway remained closed for several hours while recovery teams removed the damaged lorry and highways crews cleared debris from the carriageway.
A Hampshire police spokesperson said: “We were called at 1.26am with reports of a collision on the M27 after a lorry collided with a barrier.
“The driver sustained minor injuries.
“Closures have been in place for some time to allow recovery and clear up of the carriageway.”
The lengthy closure caused disruption for early morning motorists while emergency services and recovery operators work to make the motorway safe.
