The Automated Vehicles Bill means motorists will not be held responsible for the action of a vehicle in self-driving mode.
Insurers, manufacturers and software developers will instead be the ones liable when something goes wrong.
Transport Secretary Mark Harper said the landmark legislation means self-driving motors can be rolled out in Britain “as soon as 2026”.
He added: “This new law is a milestone moment for our self-driving industry which has the potential to change the way we travel forever.”
The Department for Transport (DfT) said the legislation delivers “the most comprehensive legal framework of its kind worldwide”.
But it stressed that self-driving motors must achieve a level of safety at least as high as “careful and competent human drivers”.
The Government have previously said 88 percent of accidents involve human error.
Trials of autonomous vehicle technology are ongoing across the UK, such as by Wayve in London and Oxa in Oxford.
It is hoped the technology will boost productivity across society.
Mike Hawes, CEO of the Society of Motor Manufacturers and Traders, said the new law was a “watershed moment”.