Bon Jovi said he looked forward to working with the "artist formerly known as prince".
Both men greeted each other warmly on the steps of the world-famous London studio synonymous with the Beatles.
They were then ushered inside to the control room overlooking Studio 2 - where Fab Four recorded during the 1960s.
A video filmed during the duke's visit showed the prince and the popstar wearing headphones.
The footage ends just as the pair are about to break into song.
Before entering the studio, the duke was heard to joke that the pair had "been gargling next door, so we're ready to go", according to the Press Association.
Bon Jovi said he had sent the song to Harry, who had sent a "very nice letter" in return which said he would "love to include it in something to do with the Invictus Games".
Speaking before the recording, he said: "In light of what has come, you know, with his leaving the monarchy, as it were, I didn't plan on any of this.
"But he said: 'Not only am I going to come back [to England], you know, but I want to be there when you do it'.
"And to do it at Abbey Road, of course where the Beatles once were; and to do it with the "artist formerly known as Prince", I think it's gonna be an incredible, moving moment."
You may also be interested in:
Prince Harry founded the Invictus Games in 2014 as a way of using sport to create a positive impact on the lives of injured service personnel and veterans.
Jon Bon Jovi has a close link with the military as both his parents served in the US Marine Corps.
The charity single version of Unbroken, featuring the Invictus Games Choir, will be released in March.
This website or its third-party tools use cookies, which are necessary for analytics and its functioning and required to achieve the purposes illustrated in the cookie policy, including the personalization and analysis of ads and content. If you want to learn more or withdraw your consent to all or some of the cookies, please refer to the cookie policy.
By clicking on Accept you are agreeing to the placement of cookies on your device.
Further use of our site shall be considered as consent. You may view our Privacy Policy and Cookie Policy here for more information.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookies
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.