The Duke of York said it was "convenient" to stay at paedophile Jeffrey Epstein's property and felt like the "honourable" thing to do at the time.
Andrew made the comments during a BBC Newsnight interview about his links to the disgraced financier who was found dead earlier this year in a prison cell while being held on sex trafficking charges.
The duke said that with "hindsight" his decision to stay at Epstein's house was "definitely the wrong thing to do" and that his judgment was "probably coloured" at the time.
When it was pointed out during the interview that he was staying at the house of a "convicted sex offender", Andrew said: "It was a convenient place to stay... There is... I have gone through this in my mind so many times.
"At the end of the day, with the benefit of all the hindsight one can have, it was definitely the wrong thing to do.
"But at the time I felt it was the honourable and right thing to do.
"And I admit fully that my judgment was probably coloured by my tendency to be too honourable but that is just the way it is."
An accuser of Epstein claims she was forced into a sexual encounter with Andrew when she was 17 years old, an allegation he denies.
Virginia Giuffre, formerly known as Virginia Roberts, is one of 16 women who says she was abused by Epstein, and also named Andrew in previous court papers.
During the interview, which is due to be aired tonight, Andrew told the BBC: "I have no recollection of ever meeting this lady, none whatsoever."
He was asked by presenter Emily Maitlis for his response to claims by Mrs Giuffre, then known as Virginia Roberts, that "she met you in 2001, she says she dined with you, danced with you at Tramp Nightclub in London. She went on to have sex with you in a house in Belgravia."
Ms Maitlis added: "You don't remember meeting her?", to which Andrew replied: "No."
Mrs Giuffre's allegations were struck from US civil court records in 2015 after a judge said they were "immaterial".
Buckingham Palace has branded the allegations "false and without any foundation" and said "any suggestion of impropriety with underage minors" by the duke was "categorically untrue".
The Duchess of York Sarah Ferguson described the duke, who is her ex-husband, as "stoically steadfast" and a "real gentleman" in a Twitter post.
The full interview, Prince Andrew And The Epstein Scandal: The Newsnight Interview, will air on BBC Two at 9pm today.
It is the first time the duke has answered questions on his relationship with Epstein. In 2015, he used a public appearance at Davos in Switzerland to deny the claims.
Asked if it was an acceptable reason for Prince Andrew to say he stayed with Epstein because it was "convenient", Liberal Democrat leader Jo Swinson told the PA news agency: "People will watch the documentary, I'm sure, this evening, and people will form their own judgments.
"I haven't seen the documentary."