Suresh Joshi, 77, said he met The Beatles stars when he was recording music for a documentary at London’s Trident Studios in 1968, at the same time as the group was recording Hey Jude.
He said they recorded the song Radhe Shaam together, which was played for the first time at Liverpool Beatles Museum in Mathew Street on Wednesday.
Mr Joshi said that when he first met Harrison, who died in 2001, he came across as “very lonely”.
He said: “He was an intellectual figure who looked very successful but was very lonely in the crowd and I just picked up on that.
“What he told me at the time is he always felt the underdog in the group.”
Mr Joshi said Harrison told him wanted to do something different, so he composed and produced a “rock song in an Indian style”.
Singer Ashish Khan performed the vocals on the track while Harrison played the guitar and Starr offered to accompany on drums.
Mr Joshi said: “It was a miracle for me to have big stars like that play for me.”
Harrison was known to have been inspired by Indian music and culture and Mr Joshi said he turned to meditation to give him confidence.
The song was never released as they all moved on to other projects.
It was only during lockdown, when Mr Joshi was speaking to family friend Deepak Pathak, that he encouraged him to try to find the tape, which was in a box in the loft of his Birmingham home.
Mr Joshi said: “I told Deepak that I had known The Beatles and I think he thought ‘this man has gone nuts’ so he said ‘prove it’.
“I found photographs from the time and then finally I found the tape.”
The song was almost lost for good when they tried to play the tape in a machine which caught fire, but it was rescued and restored by music producer Suraj Shinh, known as Nimbus.theproducer.
Mr Pathak approached the museum with the track and they arranged for it to have its world premiere on Wednesday. It will be released online later.
Museum owner Roag Best, brother of The Beatles’ original drummer Pete, said: “This was the first time George or Ringo had played for anybody else outside Beatles and then that track just got put on the backburner.
“We are actually the first people in the world to hear this song.”