A man who argued he had not committed a crime by infecting his partner with HIV has lost a High Court battle to erase the charges against him.

The man, who cannot be named for legal reasons, tested HIV-positive in 2002 and began a sexual relationship with his male partner, known as GB, in 2004.

GB regularly tested negative for HIV, and the man told him at the start of the relationship that he was also HIV-negative.

The pair had unprotected sex several times, despite the man having been warned by doctors to use a condom.

As a result, GB contracted HIV and became ill, experiencing serious symptoms including strokes, cataracts, pulmonary embolism.

He also experienced depression and anxiety.

The accused man was charged with two offences, including inflicting grievous bodily harm, and ultimately convicted — being sentenced to five years' jail with a two-year non-parole period.

During his trial, the man admitted he knew there was a possibility he could infect his partner by having unprotected sex.

But he maintained the offence with which he'd been charged was "no offence known to law", appealing to the NSW Court of Appeal, and later the High Court.

His lawyers argued in the High Court that the sex had been consensual, and the charge of grievous bodily harm required injury as the result of a violent criminal act.

The High Court dismissed his appeal, saying the law did not require the infliction of force leading to immediate physical injury to meet the charge, and that it extended to the communication of a disease or infection.

The court also found it was enough for the man to know there was a possibility of infection, rather than a probability, for him to be found guilty of recklessly inflicting grievous bodily harm.