Shrek is a large, green, physically intimidating ogre with a Scottish accent. Even though his background is something of a mystery, according to Shrek The Musical and the book, it is revealed that on his 7th birthday, Shrek was sent away by his parents because it was an ogre tradition. He is seen traveling alone, either being screamed at or teased by passers-by. The only time he receives a pleasant greeting is a wave from a young Fiona, who is promptly led away by her parents.

After scaring away an angry mob, he arrives at his swamp, enters an outhouse, and literally breaks out as the adult Shrek. Though surly, misanthropic, and venomously cranky, Shrek is peaceful and doesn't care to hurt anyone, but he just wants to live his life in solitude and be left alone. Shrek is accompanied by Donkey, an excitable, hyperactive, and talking donkey. It's notable that when Shrek's first seen, he's successfully scaring off villagers by roaring at them, but it later becomes obvious that they were only attacking him because he's an ogre, not because he did anything wrong.

In Shrek, during a conversation with Donkey, he laments that he is constantly judged by the outside world the minute people meet him, and is thus better off alone ("Look, I'm not the one with the problem, okay? It's the world that seems to have a problem with me. People take one look at me and go 'Aah! Help! Run! A big stupid ugly ogre!' They judge me before they even know me. That's why I'm better off alone."). This implies that he became a recluse after trying and failing to find acceptance among others.

Another factor causing lack of acceptance can be found in Shrek the Third, it's revealed Shrek had a father who tried to eat him as he stated, "I guess I should have seen it coming. He used to bathe me in barbecue sauce and put me to bed with an apple in my mouth," even though he might have been joking. He is primarily known for his philosophical insights relating to the nature of onions and their layers, and even seeming to enjoy them from time to time.

When he finds squatters where he lives, he attempts to evict them only to learn he has no legal recourse against them, for he does not own the swamp. Shrek is hired by Lord Farquaad to rescue Princess Fiona in exchange for the deed to the swamp, to which he can legally banish the squatters.

However, during the course of the mission, Shrek falls deeply in love with Fiona. Since he's an ogre, Shrek has a considerable amount of physical strength, being able to break wood and metal constructs, get in physical combat with a number of armored humans and usually winning, unintentionally destroying a wooden vessel with a bottle of wine, and even lifting or turning objects that are too heavy for a normal human being, such as a gigantic vat of magic potion against the maximum security of the Fairy Godmother in Shrek 2.

In Shrek in the Swamp Karaoke Dance Party!, Shrek sings "Just the Way You Are". In Far Far Away Idol, he sang "What I Like About You" by The Romantics with Fiona. Shrek has a little problem socializing due to the fact that people think he is a mean ugly ogre, even though his appearance is remarkably humanoid, with a few cosmetic exceptions. In being in the process Shrek is said to have sociophobia.[2]

However, from Shrek the Third onward, Shrek has become a well-liked celebrity, at least in Far Far Away. In the fourth movie, people managed to realize that Shrek isn't dangerous and lost their fear and prejudice over him, but to Shrek's dismay, they also come to regard him as a folk hero and visit him with even more frequency than before, disturbing him. But after the experiences of the movie, Shrek comes to appreciate his life more than ever.

Farley had recorded 80 to 90% of the dialogue for the character, but died in December 1997 before completing the project.[6] This would result in development of the film being scrapped involving storyboards and six recording sessions, which cost $34 million alone.[7]Shrek screenwriter Terry Rossio describes Farley's vocal performance as "the good hearted young ogre as being extraordinary".[8] In August 2015, footage of Farley voicing the character, originally from 1997, was leaked across the internet.[9]

In August 1998, DreamWorks then re-cast the voice role to Mike Myers, who insisted on a complete script rewrite, to leave no traces of Farley's version of Shrek. In February 2000, after Myers had completed providing the voice for the character, and after a rough cut of the film,[10] he asked to re-record all of his lines in a Scottish accent, similar to the one his mother had used when she told him bedtime stories, and also used in previous films he was in such as, So I Married an Axe Murderer (1993) and Austin Powers: The Spy Who Shagged Me (1999).[6]

Myers explained his decision, "There is a class struggle in Shrek between the fairytale kings and queens and the common people. I always thought that Shrek was raised working class. And since Lord Farquaad (the villain) was played English, I thought of Scottish".[11] After hearing the alternative, Katzenberg agreed to redo scenes in the film, saying, "It was so good we took $4m worth of animation out and did it again."[12]

Myers stated that why he was interested in voicing the character was due to his memories with his mother of acting out fairy tales:

My mother used to take me to the library in Toronto to check out the fairy tales. And she was an actress, so she used to act out for me the different characters in all these fairy tales. And then my mother would change stuff. Like because she's from Liverpool, Babar the elephant would be from Liverpool too. So I have all these great memories and associations with those stories. And I thought, when I have kids, that's the sort of well told, silly, and fun fairy tale that I would want to take them to. But it was an amazing experience. And I think Shrek is a real classic, a fairy tale classic.[15]

Myers later reported: "I got a letter from Spielberg thanking me so much for caring about the character... And he said the Scottish accent had improved the movie."[16] Some early sketches of 'Shrek's house were done in 1996 through 1997 using Photoshop, with the sketches showing Shrek first living in a garbage dump near a human village called Wart Creek. It was also thought one time that he lived with his parents and kept rotting fish in his bedroom.[17] Art Director Douglas Rogers visited a magnolia plantation in Charleston, South Carolina for inspiration for Shrek's swamp.[18][19]

Shrek appears in the stage musical version of the 2001 film, which débuted in 2008. The role was originated by Broadway actor Brian d'Arcy James, who earned a Tony nomination for it. The character has remained virtually unchanged in the musical, as does the plot. However, various minor details differ between the musical and the film. Other actors to play the role include Ben Crawford (Broadway), Eric Petersen (National Tour), Jacob Ming-Trent (Broadway understudy), Brian Gonzales (Broadway/National Tour understudy), David Foley, Jr. (National Tour understudy), and from 2011 - Nigel Lindsay (West End).