Styles also appeared to debut two new songs from his upcoming new album to close out Day 1 of the music festival.
The "Watermelon Sugar" singer rocked the night in Indio, California, where he debuted two brand new tracks ("Boyfriends" and "Late Night Talking") that appear to be from his upcoming album Harry's House, which drops May 20.
The stadium-worthy performance reached a fever pitch when, near the end of performing One Direction's "What Makes You Beautiful," Twain's "Man! I Feel Like a Woman!" started blaring from the speaker, and the crowd went wild! The country music legend also rocked her classic, "You're Still the One."
Styles, 28, donned a low-cut jumpsuit with rainbow sequins. Not to be outdone, Twain, 56, rocked a matching sequin dress with white go-go boots.
Styles, who also belted out his hit new single, "As It Was," addressed Twain and opened up to her what she meant to him and his career.
"In the car, with my mother as a child, this lady taught me to sing," said Styles via CNN. "She also told me that men are trash. To you, for the memories you gave me with my mother, i will be forever grateful."
Twain, who took to Twitter later that night and heaped him praise, responded, "I am so honored and thrilled to be here. I'm kind of lost for words. I'm a bit star-struck, what can I say?"