Initially, the Variable Speed Limit (VSL) will operate west of the Brynglas tunnels as far as junction 28.
Sensors in the road detect traffic build-ups and automatically adjust the speed limit to keep vehicles flowing.
Speed limit changes are displayed to drivers via electronic signs on the verge of the motorway.
From June the system will operate over eight miles between J24 (Coldra) and J28 (Tredegar Park).
Tim Shallcross of the Institute of Advanced Motorists said the system was already working well in other parts of the UK, including the M25 near London and the M42 in the Midlands.
"The idea is it stops people trying to switch lanes to overtake and it smooths the traffic flow, everybody carries on travelling at a lower speed," he said.
"These are mandatory speed limits so if you exceed them then you will be prosecuted."
The assembly government said the eight mile stretch of motorway was the busiest road in Wales and suffered from an above average accident rate.
Deputy First Minister Ieuan Wyn Jones said: "Ultimately, it will improve connectivity for Wales and this is essential to the economy.
"It will not only make for better travelling now, but will also encourage more sustainable travelling in the future."
Average speed cameras have been in operation along the stretch of the M4 since September 2009.
The cameras trigger penalty notices when the 50mph limit is exceeded.
More than 6,500 drivers have been issued with tickets according to figures in December 2010.
A system to keep traffic moving along a busy stretch of the M4 near Newport has begun by varying speed limits in response to road conditions.