If you think the highest-grossing animated movie in U.S. history is The Lion King, or Toy Story, or Frozen, or some other beloved Disney classic, you're wrong.

By a comfortable margin, the animated champion is 2004's Shrek 2, the not particularly remembered, not particularly beloved story of a flatulent ogre meeting his stuffy new in-laws.

In fact, it wasn't that long ago that the Shrek franchise was an absolute monster at the box office. Worldwide, the five-part Shrek franchise — four movies starring the big green guy, plus a Puss in Boots spin-off — has grossed a combined $3.5 billion. The next closest franchise (Ice Age) is more than $700 million behind.

Despite all that success — and at a time when Hollywood is desperately clinging to any franchise with a proven track record — it's been five years since Shrek's last feature-length installment, Shrek: Forever After, arrived in theaters. No one seems to miss him.

How on Earth did Shrek rise so high — only to be forgotten almost immediately?

In theory, Shrek was adapted from William Stieg's 1990 picture book Shrek! — but apart from the titular ogre, pretty much nothing survived in the transition to the big screen. In the book, Shrek is a jerk; after his parents kick him out, he steals some food from a peasant, lights a knight on fire, and generally gads about, burping and farting and irritating everyone he meets. In the end, he gets married to "the most stunningly ugly princess on the surface of the planet," and the happy couple ends up living "horribly ever after."

Shrek! is not the most fertile ground for a feature-length film, so it's kind of surprising that no less a filmmaking luminary than Steven Spielberg snapped up the rights just a year after it was published. Spielberg originally conceived Shrek as a traditionally animated movie, with Bill Murray as Shrek and Steve Martin as Donkey — but it wasn't until six years later that the project actually went into production, with Chris Farley cast to play the titular ogre. When Farley died of a drug overdose in 1997, with most (but not all) of his voiceover work complete, DreamWorks executives reportedly considered actors like Nicolas Cage, Tom Cruise, and Leonardo DiCaprio to replace Farley in the role. Eventually, Farley's former Saturday Night Live costar Mike Myers was cast in his place.

Even before Farley's death, Shrek was regarded as a disaster by DreamWorks insiders. The people working on Shrek nicknamed the project "the Gulag," because its team was comprised of animators who had been fired from other films. The source material provided almost nothing by way of a narrative backbone, and DreamWorks head Jeffrey Katzenberg — who oversaw the project — insisted it be "low-budget and experimental," which are rarely phrases used to describe mainstream, family-friendly animated films.

(Facebook.com/Shrek)

Chris Farley's Shrek centered on a teenaged ogre who wanted to be a knight, opposite a sarcastic princess voiced by Janeane Garofalo. But Myers wanted to make Shrek his own, insisting on a total script rewrite before he joined the project. After recording his Shrek in a version of his normal speaking voice, Myers was struck with inspiration: Shrek should have a Scottish accent. Per his wishes, all of his dialogue was re-recorded in the Scottish brogue — an 11th-hour change that multiple sources claim cost the project at least $4 million. (Myers disputes the figure.)

But when Shrek finally arrived, all the trouble of its production proved to be worth it. Audiences loved it, and so did critics; The Boston Globe's Jay Carr called it "new and fresh and clever," and Variety's Todd McCarthy declared it "an instant animated classic." Shrek vastly outperformed expectations, out-grossing Pixar's Monsters, Inc. on half the budget. That year also happened to be the year the Academy launched the Best Animated Feature category; Shrek won, besting Monsters, Inc. and Jimmy Neutron: Boy Genius.

Shrek really did feel like a breath of fresh air in 2001. For years, Disney and Pixar had essentially cornered the market on animated movies. Shrek was a welcome (if belated) rejoinder, with a particularly clever shot across the bow of 1991's Beauty and the Beast. Pop-cultural references abounded, including — like pretty much every other comedy released that year — a parody of The Matrix. Disney had always vehemently denied rumors about hidden, X-rated jokes in its films. Shrek did them one better by embedding those adults-only jokes straight into the narrative. The key is that they were pitched at roughly the right level — above the heads of children, but unsubtle enough to give their parents an extra chuckle.

Since then, Shrek has aged very, very poorly. By modern standards, the animation is hideous. The pop-culture references are embarrassingly dated. The voice work is uniformly obnoxious and shrill. The crass, "edgy" jokes feel like a grade-schooler desperately posturing by repeating bad words he overheard from an older cousin. And it prominently features Smash Mouth's "All Star."

Still, Shrek established a successful brand, which meant the studio doubled down on everything that made the original a hit. The subsequent sequels featured more of everything: pop-culture parodies, obnoxious voices, celebrity cameos, pop-punk covers of 70s hits. Annoying side characters got their own annoying spin-offs. And the adults-only jokes got way, way too crass. The title of the second Shrek short was "Scared Shrekless." The posters for Shrek: Forever After featured raunchy puns like "Where my witches at?" and "What the Shrek just happened?" A Puss in Boots ad offered a joke about Humpty Dumpty's fear of getting raped in prison. And meanwhile, Shrek's frenetic, celebrity-focused, pop-cultural narrative sparked legions of imitators, infecting every other animated movie released by DreamWorks, including all-but-forgotten junk like Shark Tale, Bee Movie, and Monsters vs. Aliens.

But following the record-smashing Shrek 2, the bloom on the franchise began to fade. Critics turned on the third and fourth installments, and audiences were increasingly sick of the franchise; just three years after Shrek the Third, Forever After grossed nearly $100 million less at the domestic box office. One year later, the spin-off Puss in Boots — which was designed to expand the reach of the franchise — barely grossed its production budget back in the United States. By 2012, the Shrek franchise hadn't just ended — it had become a kind of cultural punchline. When Frances takes her disastrous trip to Paris in Frances Ha, she deals with her discomfort at the unfamiliar culture by going to a movie theater and watching the perfect shorthand for soulless American pap: Puss in Boots.

(Facebook.com/Puss in Boots)

That would be the end of the story... if the dark corners of the internet hadn't stepped in to give Shrek a bizarre second life as the subject of a staggering number of creepy, often X-rated memes. Invaluable internet meme encyclopedia Know Your Meme tracks Shrek's unlikely rise to internet infamy to 2010 — around the time Forever After hit theaters — when a DeviantArt comic pairing Shrek with the Sonic the Hedgehog character Shadow the Hedgehog went viral.

The years that followed sparked a boomlet of ironic appreciation for Shrek, resulting in hundreds of memes: awful puns, half-assed Photoshops, bizarre fan fiction, and a horror video game in which Shrek stalks the player through a swamp. Many of them involve explicit sex. The most notorious — the X-rated, undeniably horrifying story "Shrek is Love, Shrek is Life" — went viral in its own right, and gave the internet's weird Shrek movement its rallying cry. (A friendly suggestion: Do not read it.) Ironic Shrek devotees called themselves "Brogres," riffing on the male My Little Pony: Friendship is Magic fans who called themselves "Bronies." They even started their own Shrek-centric spin-off of the meme repository 4chan, called — what else? — ShrekChan.

This baffling underground extension of the Shrek franchise wasn't entirely overlooked by more conventional media sources. "As with all good internet memes, it feels like one giant agreed-upon joke," wrote David Sims at the now-defunct Atlantic Wire. "No one ever admits that the Shrek series is pretty crappy, even though DreamWorks drove it into the ground as hard as it possibly could." At The Daily Dot, former Know Your Meme researcher Amanda Brennan weighed in: “In my opinion, [ShrekChan] a subversion of brony culture, again taking something relatively childish with good intentions and flipping it to an ironic appreciation."

And as with most things that bubble up from the internet's dark underbelly, mainstream recognition meant it was time to shut the whole party down. "The Shrek meme is dead, and it's time to stop trying to keep this going," wrote the founder of ShrekChan in a farewell message posted in 2014. "It is inevitable and it has to happen at some point in time. Many of you who truly love the Shrek movies may think that shutting down ShrekChan is a bad idea, but I hope that you may find another website to discuss the love for Shrek."

With even its ironic fans moving on, what's next for Shrek? A now-shuttered Broadway musical adaptation of the original Shrek flopped, grossing less than it needed to cover its production costs. A Puss in Boots Netflix series debuted in January. Despite the seeming finality of a title like Forever After, Jeffrey Katzenberg has repeatedly referenced a hypothetical Shrek 5, which he originally said would arrive in 2013 — but no further entries have even been formally announced, and a second Puss in Boots is apparently languishing in development. Meanwhile, the old movies, with their long-surpassed animation and bevy of dated cultural references, are basically unwatchable today.

For now, Shrek lives on, kind of, as a series of cheap-looking — and, based on their viewer counts, pretty much ignored — "Swamp Talk" shorts on DreamWorks' YouTube channel. In the minute-long videos, Shrek and Donkey — voiced by extremely unconvincing Mike Myers and Eddie Murphy soundalikes — discuss recipes, hiccup cures, and the weather. It's a weird, kind of depressing denouement for a weird, kind of depressing franchise — but as Shrek might say, that's the danger when you bet it all on a franchise that, unlike an onion, lacks layers.