Liberal Democrats Senator David Leyonhjelm has announced he will quit federal politics so he can contest the New South Wales state election.

Key points: Senator Leyonhjelm needs 4.5 per cent of the vote to be elected to the NSW Legislative Council

Senator Leyonhjelm needs 4.5 per cent of the vote to be elected to the NSW Legislative Council He plans to campaign for the legalisation of recreational cannabis and pill testing

He plans to campaign for the legalisation of recreational cannabis and pill testing He will be competing with One Nation and other conservative minor parties

Senator Leyonhjelm is expected to resign as early as February 28 and will attempt to win a seat in the NSW Upper House in March.

He was first elected to the Senate in 2013 and was re-elected in 2016.

Speaking to Sky News this evening, Senator Leyonhjelm said he is making the switch because he wants to work on "nanny-state issues".

"Red-tape issues are the ones that really annoy me and get up my nose," he said.

"For example liquor licensing, where you can smoke, where you can vape, gambling, lock-out laws in Sydney, assisted suicide."

He said one issue he would be taking to the NSW election would be the legalisation of cannabis, which he unsuccessfully tried to pass in Federal Parliament.

"I think there's much more hope of achieving that at the state level," he said.

Greens Senator Sarah Hanson-Young launched defamation action against Senator Leyonhjelm. ( ABC News: Jed Cooper )

"The police waste an enormous amount of time chasing people growing a bit of a dope."

He also said he would support the contentious issue of pill-testing at music festivals, which NSW Premier Gladys Berejiklian has ruled out.

"The idea that pill-testing shouldn't be used because it gives the green light to kids to take drugs is a cruel attitude to something that's taking young kids' lives," he said.

Senator Leyonhjelm attracted his fair share of controversy during his time in the Federal Parliament, including the accusation he "slut-shamed" Greens Senator Sarah Hanson-Young.

He is now facing a defamation lawsuit from the Senator for allegedly accusing her of making "the absurd claim that all men are rapists".

In 2016, he criticised Australia's gun laws and said the majority of people have no experience with guns and therefore do not realise when used safely "they are a lot of fun".

The 'accidental' senator

Senator Leyonhjelm was elected in 2013 almost by accident.

The Liberal Democrats polled a surprising 9.5 per cent of the vote, helped by the party's position in the first column of the ballot paper, which confused many voters looking for the Liberals and Nationals group.

Preferences from other parties ensured his victory and prevented the election of a Green.

Senator Leyonhjelm faced a tougher challenge winning re-election in 2016.

The Turnbull government's changes to Senate voting rules cut off flows of minor party preferences to the Liberal Democrats.

The party polled 3.1 per cent, enough after preferences to win the final vacancy at a double dissolution.

What are his chances at state level?

ABC election analyst Antony Green said Senator Leyonhjelm had little chance of election under the higher 14.3 per cent quota required at a half-Senate election.

"But 3.1 per cent is a strong starting point for election to the NSW Legislative Council where the quota is a much lower 4.55 per cent", he said.

Antony Green said Senator Leyonhjelm will face significant competition from other conservative minor parties.

"Mark Latham will head Pauline Hanson's One Nation ticket and is likely to poll in excess of a quota, possibly polling well enough to win a second seat," he said.

"He will also be competing with the Christian Democrats and the Shooters, Fishers and Farmers Party, both of whom have won seats at the last four NSW elections."

He said Senator Leyonhjelm will have to resign from the Senate by early March to nominate for the state election.

"His Senate replacement must be from the Liberal Democrats, but it may not be possible for his vacancy to be filled.