About 300 migrants, many from Syria, abandoned their struggle to walk to Budapest on Monday night, according to Euronews.
Desperate and exhausted men, women and children had walked between 15 and 20km before giving up. Many simply lay down at the side of the road, unable or unwilling to go any further, the report says.
The highway was closed to traffic for more than four hours.
Some eventually agreed to get on buses to take them back to a reception center at Roszke near the border, from where they had broken out earlier in the day.
Groups of migrants had scuffled with police and, despite the authorities using pepper spray, many managed to break through the cordon.
They set off down the wrong side of the motorway headed for the capital.
Hungary has become central to many migrants’ attempts to move further north to claim asylum in Germany, Austria and Scandinavia.
A total of 20,000 migrants are reported to have entered Germany from Hungary over the weekend alone, prompting German Chancellor Angela Merkel to describe the ongoing influx as “breathtaking.”
But Merkel added that the crisis was manageable and urged European partners to do more to help.