Father-of-five Mohammed Ilyas, 44, targeted the man in his fifties after his victim left the New Penny pub on Call Lane.
The court heard the man had been drinking during a night out and and his friends put him in Ilyas's taxi thinking he would be safe.
Leeds Crown Court heard Ilyas drove his victim to a remote farm track where he orally raped him in the early hours one morning in May 2016.
Ilyas, of Pear Street, Halifax, denied rape but was convicted by a Leeds Crown Court jury after a trial in September.
Reading the man's victim personal statement to the court, prosecutor Matthew Bean said the experience has been a "nightmare," adding: "Because of what the taxi driver did to me that night I have at many points been suicidal."
Mr Bean said the man also wrote: "I never go to town alone anymore and will never get a taxi alone again.
"I will never forget this. I don't know when or if I will ever get over it."
A Mirpuri (Punjabi dialect) interpreter translated at the hearing for Ilyas, who appeared in court via video link to HMP Leeds,
Mitigating, Daniel Calder, said his client is a married-father-of-five with no previous convictions.
Mr Calder said: "This was, and I hope the court will accept this, an isolated incident entirely out of character."
The court heard Ilyas worked for Ace Cars at the time of the offence and that the terms of his licence meant he should not have picked up a passenger who had not pre-booked.
Jailing Ilyas for 12-years, Judge Tom Bayliss QC said : "I'm quite sure that you deliberately parked your taxi outside what you knew was a gay pub, thus deliberately engineering a situation where you found yourself alone in your taxi with a passenger who was incapacitated by drink.
"That passenger had come from a pub, you then committed rape on him, a homosexual rape upon a man who you had seen coming from a gay pub.
"I'm quite sure that you targeted (the victim). It may not have been long in the planning, but once you saw, you him stopped your taxi and you targeted him."
Judge Bayliss added: "His friends, thinking he would be safe, put him in your taxi."
Judge Bayliss made a sexual harm prevention order banning Ilyas from contacting his victim and from working as a taxi driver.
Ilyas's name will be on the sex offender register for life.