Past attempts to legalise cannabis farming in Morocco have failed, but the co-ruling PJD party, the largest in parliament, dropped its opposition after the UN drug agency removed the plant from its list of most tightly controlled narcotic drugs.
The bill, which the cabinet is expected to approve next week, aims to improve farmers' incomes, protect them from drug traffickers who now control the trade in cannabis and gain access to the booming legal international market for the drug.
Cannabis is mostly grown in the northern Rif mountains, which in recent years have seen protests over economic inequality.
The draft law, seen by Reuters, envisages a national agency to monitor production, transportation and sales. The recreational use of cannabis in Morocco would still be banned.
Parliament, where the moderate Islamist PJD is the biggest party, must still approve the plan.
Though growing cannabis is currently illegal in Morocco, it has long been tolerated and the North African kingdom is among the top global producers, according to the UN drug agency.
Morocco reduced the amount of land where cannabis is cultivated from 134,000 hectares in 2003 to 47,000 hectares six years ago, the interior ministry has said.
In December, the UN drug agency’s member states narrowly voted to remove cannabis from the most tightly controlled category of drugs, following the World Health Organization’s recommendation to make research into its medical use easier.
Morocco was among the countries backing the change.