A man has won a legal battle in a NSW court after being prosecuted for failing to vote in the 2016 federal election, saying voting would have left him feeling "morally corrupt".

Adam Easton admitted he didn't vote in the July 2016 election but pleaded not guilty to failing to vote.

Adam Easton's win is the first time an elector has had charges dismissed under that section of the Act, which the magistrate said was "remarkably subjective". Credit:Max Mason-Hubers

He relied on a section of the Commonwealth Electoral Act that states a person who believes it's his or her religious duty to abstain from voting has a valid reason not to vote.

The self-described agnostic said he believed in "Freedom" - an ideology that forms the basis of his view of life and his moral framework.