Cowell said in a Twitter message that Spears, 30, the world's biggest pop phenomenon of the 2000s, will join him on "X Factor," which searches for a new pop star from tens of thousands of ordinary Americans.
Spears will be joined by singer and actress Lovato, 19, to fill the judge's seats left by Paula Abdul and Nicole Scherzinger, who were both fired by Cowell after a disappointing first season in 2011.
Cowell announced the news on Twitter, sending a photo of himself with record producer Antonio "L.A." Reid, Spears and Lovato and saying "Can't believe it's finally happening. Very exciting!"
His Tweet landed moments before Fox made the official announcement in New York in a presentation to advertisers of its new 2012-13 season programming.
Spears and Lovato both appeared in person at the presentation, ending months of speculation about the replacements for the show.
Spears found fame as a 16 year-old in 1998 with her debut single "Baby One More Time" and went on to score multiple hits with songs like "Crazy", "Oops I Did It Again" and "Womanizer". She had a much-publicised personal and career meltdown in 2007 but made a comeback with her 2008 album "Circus" and a world tour.
Lovato found fame on Disney Channel's TV series "Sonny With a Chance" before launching a career as a pop singer with hit singles like "Skyscraper".
"Britney remains one of the biggest stars in the world, she's talented, fascinating - and I believe she knows exactly how to spot 'The X Factor'," Cowell said in a statement.
"Demi's had an amazing career in music, TV and film for someone her age. She's young, confident, and enthusiastic. I think it's really important that she speaks to our younger audience."
Spears said in New York, "I'm so excited by this whole experience. It's so different from anything I've ever done."
Fox gave no details of their contracts but Spears has been widely reported to be getting $15 million a year for "X Factor" gig, which would make her one of the highest-paid TV reality show judges.
Mariah Carey, Janet Jackson, Miley Cyrus and Avril Lavigne were among other names rumored to have been approached or in talks with Cowell about taking part in "X Factor".
Cowell launched the US version of "X Factor" last September with great fanfare and boasts that it would topple ageing "American Idol" as America's most-watched TV show.
But the show mustered only about 13 million viewers – about half the audience for "American Idol" - and many critics disliked its brash, noisy production and felt it added little new to the crowded TV singing contest field.
Fox and Cowell are still yet to announce a new host after firing little-known Briton Steve Jones in January.
"The X Factor" faces further challenges in its second season following news on Sunday that NBC will be airing its hit contest "The Voice" in the fall of 2012, as well as the spring.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ