The rape conviction of Sydney man Luke Lazarus has been quashed and a retrial ordered after the state's highest court upheld his claim that the judge in his trial misdirected the jury.

Mr Lazarus, 24, had spent 11 months in jail over the rape of a woman in an alley behind a Sydney nightclub but was released in February after the NSW Court of Criminal Appeal granted him bail with a $50,000 surety pending the outcome of the appeal.

At that point the court left open the possibility of an acquittal but on Tuesday the three-judge appeal panel ordered a retrial.

Outside court Mr Lazarus said: "I'm looking forward to a retrial and I'm excited to clear my name in the future."