The 40-year-old singer/songwriter - who reportedly got married to Sofia Wellesley earlier this month - declared his love for another special person in his life when he paid tribute to the flame-haired British royal for organising the sporting event.
While introducing his 2004 number one single at the ceremony at the Queen Elizabeth Olympic Park in Stratford, west London, he told the crowd: ''This is a song for someone very special who organised this event. Prince Harry, I dedicate this song to you.''
He then started playing the song, which is written about one of the star's ex-girlfriends.
Speaking about the song in 2006, he said: ''It's kind of miserable. It was about seeing my ex-girlfriend on the Underground in London with her new man, who I didn't know existed.
''She and I caught eyes and lived a lifetime in that moment, but didn't do anything about it and haven't seen each other since.''
James' bizarre love song dedication to the prince wasn't his only moment of excitement at the ceremony as he finished off his set by crowd surfing.
Beforehand, the 'Goodbye My Lover' hitmaker praised the wounded male and female soldiers who competed in the inaugural tournament.
He added: ''I served in the army for six years and it was the best time of my life.''
Several other stars took in the action including former England rugby players Lawrence Dallaglio and Jason Robinson, while Harry was seen taking in a lot of the action from his seat in the grandstand.
Jaguar Land Rover are the official presenting partner of The Invictus Games. Visit www.jaguarlandrover.com.