Organisers revealed the singer, who has sold more than 200m albums, will play Pride in the Park on Saturday 1 August.
The three-day event, which runs from 31 July to 2 August, will also feature a headline performance from The Pussycat Dolls, who recently reformed and released a new single, “React”.
Festival representative Chris Jepsen said Carey was “a huge LGBTQ+ ally” and explained that signing her for the event had taken months of planning.
“She wants to come and do this event,” he told the BBC.
“She got the GLAAD award in 2016 so she’s a huge LGBTQ+ ally and works with the community for acceptance and inclusion. She’s been a friend of the community for many many years.
“She’s a global icon, not just for the LGTBQ+ community.”
Last year, more than 250,000 people to the city for the festival, which was headlined by Kylie Minogue. Britney Spears played to an audience of 57,000 in 2018.
Jepson said Pride was excited for “everything Mariah can throw at us” and is hoping “she’s going to pull out all the big hits”.