Kaufman and Hart wrote the play as a vehicle for their friend Alexander Woollcott, the model for the lead character Sheridan Whiteside. At the time the play was written Woollcott was famous both as the theater critic who helped re-launch the career of the Marx Brothers and as the star of the national radio show The Town Crier. Woollcott was well liked by both Kaufman and Hart, but that did not stop him from displaying the obnoxious characteristics displayed by Whiteside in the play. Kaufman and Hart had promised a vehicle for Woollcott but had been unable to find a plot that suited them until one day Woollcott showed up, unannounced, at Hart's Bucks County estate, and proceeded to take over the house. He slept in the master bedroom, terrorized Hart's staff, and generally acted like Sheridan Whiteside. On his way out he wrote in Hart's guest book, "This is to certify that I had one of the most unpleasant times I ever spent." Hart related the story to Kaufman soon afterwards. As they were both laughing about it, Hart remarked that he was lucky that Woollcott hadn't broken his leg and become stuck there. Kaufman looked at Hart and the idea was born.
Woollcott was delighted with the play and was offered the role for its Broadway debut. With his busy schedule of radio broadcasts and lectures he declined and Monty Woolley played the part. Woollcott did play Whiteside in the West Coast version of the play, and was even joined by Harpo Marx, who portrayed his own referenced character, Banjo.
The printed edition of the play starts with the inscription "To Alexander Woollcott, for reasons that are nobody's business."