The 35-year-old bumped into Floyd Mayweather after spending some time in Dubai on the weekend.
Mayweather was expected to fight in an exhibition against Don Moore but it got postponed due to the passing of UAE president Sheikh Khalifa bin Zayed Al Nahyan.
The American did, however, spend time with Khan and the former two-time world champion revealed what was said in their conversation to Planet Sport on a media Zoom call.
"He said, 'look we should get it on'. I said 'brother, tomorrow I'm going to announce my retirement' and he goes 'no I don't think you should'.
On previous speculation about fighting Mayweather in his prime, Khan said: "We may fight each other, we could fight each other and they keep you on the side, on the bench (Mayweather and Pacquiao), forget that. I want to be in control of my own self.
"When I call it a day, I call it a day. I'm not going to not call it a day because of someone else taking control like Floyd Mayweather or Manny Pacquiao saying we're going to fight you or waiting around. So I said no, I'm going to do what I think is best for me."
What was Khan's greatest achievement?
Khan leaves the sport having become the youngest Olympic medalist from the UK in boxing at 17 and a unified light welterweight champion.
He dominated Paulie Malignaggi, won a Fight of the Year in 2010 against Marcus Maidana and fought the best fighters of a generation including Canelo Alvarez and Terence Crawford.
When asked on a media Zoom call about what his greatest achievement was, Khan said: My best nights was when I was with Freddie Roach and the start of when I was with Virgil Hunter.
"The likes of the Maidana fight, (Andreas) Kotelnik fight, Zab Judah fight and obviously the fight against Danny Garcia where I was doing really well in the early rounds if you think about it.
"Then I obviously got caught with a big shot and that's boxing for you. I think that was the peak of my career but God has been kind and I was about 24 or 25 then. The peak of my career was from 21 to 26.
After that I could see I declined but still I've had the biggest fights and fought the biggest names in the sport of boxing - the best pound for pound fighters in the world so I'm so happy the way my career's gone," added Khan.