A narrator (Rex Allen, Jr.) introduces Charlie Baileygates (Jim Carrey), an 18-year veteran Rhode Island State Police trooper who has been taken advantage of by people throughout most of his life.
Immediately after marriage, his wife, Layla (Traylor Howard), cheats on him with a dwarf African-American limousine driver named Shonté (Tony Cox), who, like Layla, is a member of the high-IQ group Mensa. Charlie's friends try informing him of his wife's infidelity, but he denies the possibility. One year later, Layla runs off with Shonté, leaving Charlie to raise three biracial sons who are the products of Layla's adulterous affair with the limo driver (and one of whom is actually named Shonté, Jr.).
Charlie never sees his wife again. He raises his illegitimate triplets allowing them to watch Richard Pryor stand-up and feast on sweets. Two of the three become obese, and all are foul-mouthed young adults, but they are also highly intelligent (like their biological parents) and they treat Charlie with much more kindness and respect than anyone else does.
His wife's affair and abandonment leaves Charlie so emotionally damaged that he lets himself be abused and taken advantage of by others. Despite his friendliness and his being a police officer, the townspeople reject Charlie's authority with open scorn.
After years of continuous abuse, Charlie develops a rude and violent split personality named Hank, caused by "advanced delusionary schizophrenia with involuntary narcissistic rage". As Hank, he goes around retaliating against anyone who has accosted him — and even harms those who really haven't. A psychiatrist prescribes a medicine to keep Hank suppressed.
Believing that Charlie needs a vacation, his commanding officer (Robert Forster) orders him to escort a woman named Irene Waters (Renée Zellweger) from Rhode Island to Massena, New York, because she reportedly committed a hit-and-run. Irene insists the hit-and-run accusation was created by Dickie, her mob-connected ex-boyfriend, and by corrupt police officers in his employ.
When hitmen arrive with a contract on Irene's life, Charlie agrees to help her escape. A United States Environmental Protection Agency (EPA) agent is killed by the hitmen. Charlie accidentally leaves his medicine behind, causing his alter ego, Hank, to surface without warning.
The FBI suspects that Charlie is responsible for assassinating the EPA agent. The FBI joins Charlie's commander in pursuing him and Irene. Charlie's sons pretend to work with the police to find their father, but steal a helicopter to get to Charlie before the police do.
Along the way, Irene and Charlie grow close. However, Hank's random appearances both disgust and frighten Irene. Hank's aggression and resourcefulness aid in their survival, but Irene finds herself attracted to Charlie. Hank tells her about Charlie's life, and how years of humiliation have destroyed Charlie's confidence.
Hank has plastic surgery performed on Charlie's face. He also uses hours of careful cunning to trick Irene into sleeping with him by posing as the good-natured Charlie. They meet a mild-mannered but mysterious young albino man named Casper (Michael Bowman). (Casper saids in the movie that his friends call him "Whitey.") They continue their journey as a trio, until Whitey calmly tells Charlie the story of how he brutally murdered his entire family. Charlie and Irene, frightened by this, sneak away in the night.
Dickie orders corrupt agents to kill both Charlie and Irene, then decides to settle the matter himself after they fail. Charlie finally manages to eliminate the alternate personality and regain the courage to rescue Irene, but only after Dickie shoots off one of his thumbs. Charlie is aided in the fight by Whitey, who reappears to throw a lawn dart into Dickie's back, killing him. Charlie apologizes for making him kill again, but Whitey explains that he made up the story about being a murderer in order to seem cool to Charlie, and that his family now lives in Arizona.
With Hank gone, and Dickie's crew dead or behind bars, Irene is finally free to return to her old life. She drives away, but the Rhode Island State Police pull her over. The arrest is a set-up, giving Charlie a chance to propose to her. Irene accepts, much to the delight of Charlie's sons and Whitey, who watch from a plane and compliment the viewer for watching the movie.
A post-credits scene shows Charlie, his sons, Irene and Whitey looking for Charlie's thumb in the river; however, Whitey sees it get eaten by a fish underwater.