"Jim and Jenny have recently decided to end their five-year relationship," Carrey's representative, Marleah Leslie, told People.com Tuesday.
No reason was given for the split.
"I'm so grateful for the years Jim and I shared together," McCarthy said in a separate statement. "I will continue to be in his (adult) daughter's life and will always keep Jim as a leading man in my heart."
"I'm grateful 4 the many blessings we've shared and I wish her the very best! S'okay!" Carrey said on Twitter.
Carrey has starred in the films "The Mask," "Ace Ventura: Pet Detective," "Liar, Liar," "The Truman Show" and "Eternal Sunshine of the Spotless Mind."
McCarthy is also a model, author and former television personality. In recent years, she has focused her energy on Autism research and advocacy because her 6-year-old son Evan is autistic.
Ron Burgundy interviews Peyton Manning on SportsCenter
Martin Bashir resigns from MSNBC over Sarah Palin comments