He told the BBC’s The One Show that Lennon agreed to perform with him at Madison Square Garden in New York in 1974 as a result of a bet.
Sir Elton told Lennon that if his song Whatever Gets You Through The Night, which he sang on, reached number one then they had to go on stage together.
Sir Elton, 73, said Lennon “was so nervous he threw up before the show”.
He added: “I will never forget the reaction he got.
“It was an ovation. As I think about it as I’m talking now, I get goosebumps.”
The pair “became really great friends for a couple of years”, Sir Elton said.
Lennon, who was murdered in 1980, would have celebrated his 80th birthday last week.
The Madison Square Gardens performance would be his last on stage.
Sir Elton also discussed his life during lockdown, saying “the silver lining” has been that he has got to spend time with his family.
“I never get to spend much time with them anyway, so since March when we left Australia we’ve been in complete lockdown either in Los Angeles or in Britain and we’ve spend every single day together and it’s been wonderful,” he said.