The 25-year-old pop star brought out JC Chasez, Joey Fatone, Lance Bass and Chris Kirkpatrick of the 90s boyband - with Justin Timberlake the only member not present - who wowed with a rendition of their 1997 classic 'Tearin' Up My Heart' shortly after Ariana performed recent single 'Break Up With Your Girlfriend I'm Bored', which samples their song 'It Makes Me Ill'.
Before they came out on stage at the festival in Indio, California, the 'Dangerous Woman' hitmaker said: ''I've been rehearsing my whole mother**king life for this moment.''
After their performance, the 'Bye Bye Bye' group said: ''Coachella, this has been a dream of ours, thank you Ariana!''
The 'Pop' hitmakers built up the anticipation by posting a selfie with Ariana backstage and posting a live link for the show.
Alongside the Twitter snap, they wrote: ''Tune in now https://youtu.be/bAS_E1D0UXw @coachella @ArianaGrande (sic)''
The impressive 23-song set also saw Nicki Minaj make an appearance for 'Side to Side' and 'Bang Bang', however, unfortunately there was a tech glitch which plagued the songs, with Ariana stating that they couldn't ''hear anything''.
Just over halfway through the performance, the 'No Tears Left to Cry' singer also brought out rapper Diddy for 'Mo Money Mo Problems'.
NSYNC's performance wasn't a complete surprise, as TMZ had reported that the four band members were set to join Ariana at the Empire Polo Club.
Meanwhile, Ariana had reshuffled and cancelled some of her 'Sweetener Tour' dates to make room for Coachella.
The 'thank u, next' hitmaker, who will return next weekend for another headline performance at the famed music festival, was forced to make a few changes to her run of dates in the US, which affects her shows in Chicago, Indianapolis, Columbus, Milwaukee, St. Louis, St. Paul, Denver and Salt Lake City, with the tour now running well into July.
The superstar also cancelled her planned performances in Omaha and Raleigh.
A concert at Las Vegas' T-Mobile Arena was added for May 11, to make up for a previously cancelled show in Sin City.
The 'Dangerous Woman' singer has also been lined up to headline Lollapalooza Festival in August.
A source previously told Variety that Ariana was already in discussions for the booking long before she held discussions for the Coachella Valley Music And Arts Festival.
Lollapalooza takes place in Chicago's Grant Park August 1 and August 4.
Stealing Sheep's eleven track album is a shimmering piece of bright and bold pop that translates a day-glo and glitter imagination into a sparkling...
Make sure you're tooled up properly for your next festival weekend.
In one of the tiniest theatres, on one of the smallest stages, and playing to a diminutive audience, the petite Amy Odell played a tremendous gig...
Live Through This was released on this day (April 12) in 1994.