Caroll Spinney and Oscar the Grouch at the Daytime Creative Arts Emmy Awards in New York in April 2006. (Brad Barket/Getty Images)

He’s green, he lives in a trash can and he’s always waking up on the wrong side of the bed.

His name is Oscar the Grouch, and even people who watched “Sesame Street” as kids might find him a bit confounding. Why is he green? How did he choose his home? And why’s he in such a bad mood?

The answer lies with Caroll Spinney, the performer behind the roles of Big Bird and Oscar the Grouch, who announced his retirement from the show Monday after almost 50 years. (Fellow puppeteer Eric Jacobson, who plays Miss Piggy, Grover and Bert, will take the reins.)

Spinney was introduced to the characters when “Sesame Street” creator Jim Henson called him in the early 1960s.

Henson “said, ‘Why don’t you come down to New York and talk about the Muppets?’” Spinney told NPR in 2003. “'I have some characters I want to build. One is a tall, funny-looking bird and the other’s going to be this grouchy character who’s going to live in a pile of trash in the gutter.’”

After Oscar the Grouch was born as that grumpy Muppet — though, originally, he was orange — Spinney had to give him a voice.

“I had never done a character like Oscar, and I didn’t feel any of my voices sounded like the Muppets I was used to hearing,” Spinney wrote in his book “The Wisdom of Big Bird."

He looked to the streets of New York for inspiration, finding the Bronx cabdriver who drove him to the meeting with Henson.

“He was the stereotypical cabbie of the time — a guy in his 40s from the Bronx wearing a tweed cap with a little brim — and he kind of growled out of the corner of his mouth, ‘Where to, Mac?’” Spinney wrote. “Who could be more of a Grouch than a cabdriver from the Bronx? I had my ideal model for my new character."

The purpose of Oscar, according to the Smithsonian National Museum of American History’s description of the character, is to teach “the importance of understanding, tolerance, and diversity.” According to Robert W. Morrow’s book “'Sesame Street' and the Reform of Children’s Television,” Oscar acted differently and lived in a different kind of home as a metaphor, “to dramatize tolerance for those who are different. … In segments about conflicts between Oscar and the others on the street, the show taught how children might cope with diversity in the context of school desegregation.”

Despite the admirable intentions behind the character, though, Spinney originally thought he might not be suitable for children.

“I used to question that in the early days of ‘Sesame Street.' Why is Oscar on? He’s such an unpleasant and even seemingly rude character,” he told HuffPost. “One producer said, ‘Well I think it takes all kinds to make a world. And he’s just another kind.’ "

But in the end, Spinney found that Oscar always had a heart. Although he would complain, he still helped those in need — he just did so while grumbling away. When his human friend Maria needed a bolt to fix a wagon, for example, Oscar dug through his trash can to help find one, but not before muttering, “Gee, another rotten day.” “As grouchy as he is, he would always let a hungry kid eat before he did,” Spinney wrote.

The character proved to be an enormous hit. On the show, he would sometimes complain to famous musicians such as Johnny Cash and Billy Joel. And the character spawned various versions throughout the world: His cousin Moishe Oofnik appears in Israel, living in an old car. In Turkey, his name is Kirpik and he resides in a basket. And in Pakistan, he’s Akhtar, and his home is an old oil barrel.

He’s even popped up in a number of other popular shows, such as “Scrubs,” “The Simpsons” and “South Park.”

Oscar may be a worldwide celebrity at this point, but to Spinney, he’s just the grouch who goes to great lengths to hide his heart of gold.

Spinney admitted that Oscar “doesn’t think the way I think at all,” but that’s what made the character so special to him.

“I’m dealing with a mental entity who isn’t me, even though I’m empowering him,” Spinney wrote. “Oscar has taught me the power of the puppet.”

“And I’ll say this,” he continued. “After playing Big Bird all day, it is almost therapeutic to switch to Oscar, to live awhile with the exact opposite attitude about life.”

Watch more: