In February 1848 Martin nominated as a candidate for a by-election for the electorate of Durham in the New South Wales Legislative Council, but withdrew before polling day. In the general election held later in the same year he was a candidate for the electorate of Counties of Cook and Westmoreland, which he won with a margin of 16%. His election however was declared void on the grounds that he did not meet the property qualifications to stand, however he was re-elected unopposed. Martin subsequently sued the Speaker of the Legislative Council, Charles Nicholson and the Sergeant at Arms, William Christie, for trespass for having him removed when there had been no decision of the Electoral Court in accordance with the "Electoral Act" 1843. The Full Court of the Supreme Court held that under the "Electoral Act" 1843 it was only the Electoral Court that could determine there was a vacancy and not the Governor.