Doctors will be able to prescribe cannabis products to patients from 1 November, the Home Secretary Sajid Javid says.
The new regulations apply to England, Wales, Scotland and Northern Ireland.
Mr Javid decided to relax the rules on when cannabis products could be given to patients after a review into medicinal cannabis earlier this year.
This followed an outcry over Alfie Dingley and Billy Caldwell being denied access to cannabis oil.
The parents of the two young epilepsy sufferers said the product helped to control their seizures.
Alfie’s mother, Hannah Deacon, welcomed the move, saying: “We urge the medical world to get behind these reforms so they can help the tens of thousands of people who are in urgent need of help.
“I have personally seen how my son’s life has changed due to the medical cannabis he is now prescribed.”
Professor Mike Barnes, the medical cannabis expert who secured the first long-term licence for its use for Alfie, encouraged doctors to embrace the changes to the laws on prescribing medicinal cannabis.
An initial review by chief medical officer Dame Sally Davies concluded there was evidence medicinal cannabis has therapeutic benefits.
The Advisory Council on the Misuse of Drugs (ACMD), which carried out the second part of the review, then said doctors should be able to prescribe medicinal cannabis provided products met safety standards.
It recommended cannabis-derived medicinal products should be placed in schedule two of the Misuse of Drugs Regulations 2001.
Cannabis has previously been classed as a schedule one drug, meaning it is thought to have no therapeutic value but can be used for the purposes of research with a Home Office licence.
Doctors can prescribe medical cannabis from November in UK