Zehut, a libertarian Jewish nationalist party, was also promised a ministerial portfolio in exchange for not putting up candidates for the September 17 legislative elections, its head Moshe Feiglin said.
At a joint press conference, Netanyahu told Feiglin: "I see you as a minister in the next government and I see you as a partner with a common vision."
The veteran Israeli prime minister and Likud party chair is trying to secure right-wing votes for his Likud party ahead of the polls, after he failed to cobble together a coalition following legislative elections in April.
In the last election campaign, Feiglin's party had promised to legalise cannabis -- a stance that won votes beyond the usual right-wing reservoir.
But Zehut still only won 2.7 percent of votes in those elections, below a threshold of 3.5 percent required for representation in the Knesset.
In a bid to prevent right-wing votes being wasted, Netanyahu -- the longest serving prime minister in Israeli history -- has said he will do his utmost to persuade small right-wing parties with little chance of meeting the threshold not to run.
The agreement between his Likud party and Zehut-- seen by AFP -- states that "in the first Knesset session, a bill will be voted on for the legalisation of marijuana for medical purposes".
The proposed bill would also open Israel to imports of medical marijuana.
Feiglin had been a Likud lawmaker before setting up his own party in 2015.
Two other small-right wing parties remain in the running: Jewish Power, two of whose candidates have been banned under a law against incitement to racism, and the orthodox Noam party, known for campaigning against LGBT rights.