Both artists - who were first rumoured to be appearing on the penultimate episode earlier today - performed their new singles, with Beyoncé singing a stripped-down version of her new single 'One Plus One Plus One' from her upcoming album 4 while Lady GaGa took to the stage for a rendition of 'The Edge of Glory'.
Beyoncé also performed a medley of some of her biggest hits, including 'Single Ladies', 'Irreplaceable' and 'Crazy In Love', alongside the show's Top 13 girls.
Carrie Underwood, Tim McGraw, Tom Jones, Jack Black, Judas Priest and Tony Bennett also duetted with this season's finalists, while Bono and The Edge's version of 'Rise Above The Dark' was accompanied by a performance from the Broadway production of Spider-Man: Turn Off The Dark.
Judges Steven Tyler and Jennifer Lopez took part in the festivities as well, with Tyler rousing the crowd with a version of Aerosmith's classic 'Dream On'. Lopez performed a provocative dance number during husband Marc Anthony's performance of 'Aguanile'.
American Idol crowned its winner for the season at the end of Wednesday's broadcast.
More on the American Idol season finale:
> American Idol recap: The finale performances
> Lauren Alaina loses voice before 'Idol' final
> American Idol finale performance night: Pictures
> American Idol attracts record-breaking votes
> Poll result: Who should win American Idol?
> Read our American Idol news, recaps and features
Watch Beyoncé perform '1+1' on American Idol below:
Watch Lady GaGa perform 'The Edge of Glory' on American Idol below: