The 66-year-old music legend paused midway through his iTunes Festival performance at the Camden Roundhouse in north London to praise the 19-year-old singer, who was in the audience, and his One Direction bandmates, as well as slamming fellow musicians for criticising their record companies.
Speaking to the capacity crowd after performing 'Rocket Man' and 'Sorry Seems to Be the Hardest Word', he said: ''I have an amazing life, as you probably know, travelling around all these places. But I don't take it for granted.
''I want to say thank you to my record company. They've been amazing. You don't usually get artists thanking their record company, they're usually having a go at them.
''And I want to say thanks to the fabulous Harry Styles, I love Harry and I love One Direction.''
Following a few mutters from the crowd, Elton - whose partner David Furnish was watching on in the audience - hit back: ''I love them, f**k off.''
He then continued: ''I want to thank my angel up there, David, too.''
Following his speech, Elton performed classics 'I'm Still Standing' and 'Saturday Night's Alright For Fighting' to the star-studded crowd, who included Benedict Cumberbatch and Stephen Fry, as well as new songs from his forthcoming album 'The Diving Board'.
The singer also dedicated his 1971 hit 'Tiny Dancer' to his support act Tom Odell, saying: ''I'm so fond of him and he's going to be around for a long time.''
Elton's set opened up in superb style with Croatian duo 2Cellos performing Nirvana's 'Smells Like Teen Spirit' and AC/DC's 'Highway to Hell' on their instruments.
Elton then launched into his energetic set with 'The Bitch is Back', which was accompanied by a video loop of Baywatch beauty Pamela Anderson pole dancing while wearing a skimpy bikini.
Shortly before concluding his barnstorming set with 'Your Song', he thanked his fans for their dedication over the years.
He said: ''It's such a wonderful time to be alive. I've had such a wonderful life, I've got such a wonderful partner.
''It's a magical thing to make music but the real reason why I do it is to play live.
''I want to dedicate this to you and all of you out there listening. Thanks to all you've given me.''
The season 7 premiere guests featured some cast members we haven't seen much of for a while.
This year's Rotterdam event was definitely one to remember.
For those who knew him, Gary Unwin (better known as Eggsy to his friends), was...
In July of 2015, Ed Sheeran played his biggest gigs to date, selling out Wembley...
It's fair to say that Vincent Furnier made musical history when he became Alice Cooper;...
Elton John is one of the biggest and most glamorous rockstars of all time having...
Motivated solely by corporate greed, Disney has recently begun cranking out low-ambition, high-profit margin throwaway...