Liberal Democrats senator David Leyonhjelm will quit federal politics next month to contest the NSW state election.

The move, first reported in The Sydney Morning Herald in October, pits Senator Leyonhjelm against one-time Liberal Democrats member and former Labor leader Mark Latham, who is running for One Nation in the state's upper house at the March 23 election.

David Leyonhjelm will run for an upper house seat in the NSW election in March. Credit:James Alcock

The crossbench senator was first elected to the Senate at the 2013 federal poll and was re-elected at the 2016 double dissolution election.

Mr Leyonhjelm said he was more interested in state issues, describing NSW as "nanny-state central".