Wikisimpsons - The Simpsons Wiki
The show's writers use the phrase "(Annoyed Grunt)" to represent the catchphrase; episode titles with the original spelling include, "E-I-E-I-(Annoyed Grunt)", "I, (Annoyed Grunt)-bot", and "G.I. (Annoyed Grunt)". Episodes with d'oh in their titles include: "D'oh-in' in the Wind", "Days of Wine and D'oh'ses", "C.E. D'oh", "We're on the Road to D'ohwhere", "He Loves to Fly and He D'oh's", and "Waverly Hills 9-0-2-1-D'oh".
When Dan Castellaneta, the voice of Homer, was first asked to voice the exclamation, he rendered it as a drawn out "doooh", inspired by Jimmy Finlayson, the moustached Scottish actor who appeared in many Laurel and Hardy films. Finlayson coined the term as a minced oath to stand in for the word "Damn!" The show's creator Matt Groening felt that it would better suit the timing of animation if it were spoken faster so Castellaneta shortened it to "D'oh!"
It was first heard on a Tracey Ullman Show short entitled "Punching Bag", which first aired on November 27, 1988. When Bart and Lisa try to hide a punching bag with his face on it, and it knocks him out. Homer's reaction is "D'oh!" The next occasion it was heard was in the first episodes of The Simpsons, "Simpsons Roasting on an Open Fire", which first aired on December 17, 1989.
Variations of the catchphrase have appeared in numerous episodes of The Simpsons.
 Episode names
When originally created, the word had no official spelling. Instead, it was written as "(annoyed grunt)". In recognition of this, several episodes feature the phrase "(annoyed grunt)" in the episode title where one would, for acoustic and aesthetic reasons, usually expect the term "d'oh". Such episodes include "I, (Annoyed Grunt)-bot" (instead of "I, D'oh-bot", a play on I, Robot); "Simpsoncalifragilisticexpiala(Annoyed Grunt)cious" (a parody of the song Supercalifragilisticexpialidocious in Mary Poppins); "E-I-E-I-(Annoyed Grunt)" (a parody of Old MacDonald Had a Farm); and "G.I. (Annoyed Grunt)" (a parody of G.I. Joe). Even in closed captioning, the show showed "(annoyed grunt)" in place of "D'oh!" in early airings.
Eight episodes so far have "d'oh" in their titles, all in later seasons: season 10's "D'oh-in' in the Wind", season 11's "Days of Wine and D'oh'ses", season 14's "C.E. D'oh", season 17's "We're on the Road to D'ohwhere", season 19's "He Loves to Fly and He D'ohs", season 20's "Waverly Hills 9021-D'oh", season 23's "The Falcon and the D'ohman, and "The D'oh-cial Network".
The term "d'oh!" has been adopted by many Simpsons fans, and even by people that are not specifically fans. The term has become commonplace in modern speech and demonstrates the reach of the show's influence. "D'oh" has been added to the Webster's Millennium Dictionary of English, the Macmillan Dictionary for Advanced Learners, and the Oxford English Dictionary. It is defined as: "Expressing frustration at the realization that things have turned out badly or not as planned, or that one has just said or done something foolish. Also (usu. mildly derogatory) implying that another person has said or done something foolish (Duh)." The OED etymologizes the word as "popularized by The Simpsons" but lists usages as early as 1945. It is also now becoming a popular minced oath for many various curse words, especially damn.
 Other languages
In the German-dubbed version, "d'oh!" is translated to Nein! ('No!', pronounced like the number 'nine'). In the Spanish-dubbed version, "d'oh!" is changed to ¡Ou! (pronounced like the letter 'O'). The pronunciation, along with the proper Homer-esque intonation, has entered the popular culture of many Spanish-speaking countries. The closed captions for the programme—though this may only occur in the US—spell "D'oh" as "D-ohh!". In Italy, the parts where Homer utters the word are left unedited, thus still bearing Castellaneta's voice.. In the French-dubbed version, in France, due to a prononciation mistake, "d'oh!" became "t'oh!", but in Quebec, the Homer's Annoyed Grunt is still "D'oh!".