In the doghouse
In disgrace; out of favour.
In Chapter 16 of Peter Pan, 1911, J. M. Barrie used a plot device in which the father of the family, Mr. Darling, consigned himself to the dog's kennel as an act of remorse for inadvertently causing his children to be kidnapped. This appears to be an obvious source for the phrase 'in the doghouse' and several etymologists have confidently stated it to be just that. With such a neat match between the play's story line and the meaning of the phrase it's sad to report that the expression has nothing to do with Peter Pan - any more than does 'By Hook or by crook', which is sometimes associated with Pan's nemesis Captain Hook. The expression doesn't appear in Peter Pan and that's hardly a surprise as in the UK dogs live in kennels. Doghouse is chiefly an American term and is rarely used in Scotland, where Barrie was born, or in England, where he was living when he wrote Peter Pan.
The expression 'in the doghouse' is first found in print in Criminalese, 1926, J. J. Finerty's glossary of the language of criminals:
In dog house, in disfavor.
References to people or dogs being 'in the doghouse are found earlier but these a straightforward literal descriptions. The phrase began to be used with its figurative meaning widely in the USA in the 1930s. An example is found in the Iowa newspaper the Waterloo Daily Courier, January 1933:
The poor French ambassador! You can't help but feel kinder sorry for him. He is still in the doghouse.
The origin of the phrase is more prosaic than the Peter Pan theory; it just refers to someone who is out of favour being sent out alone into the cold.