In a letter to the Daily Chronicle dated 28 April 1898, Shaw explained the conversations that led him to write Mrs. Warren's Profession. His friend, actress Janet Achurch, had pointed him to the short story Yvette by Guy de Maupassant as a possible source of inspiration for a play. He decided to move forward with the project when, the following fall, a woman named Beatrice Webb suggested he write a play about a realistic woman.
Shaw completed the play in 1894, but Britain's theater censor, Lord Chamberlain, banned it due to its focus on prostitution (Mrs. Warren's titular "profession".) It was published in a collection of Shaw’s plays called Plays Pleasant and Unpleasant in 1898.
The London Stage Society finally performed it at the members-only New Lyric Club in London in January of 1902, starring Fanny Brough as Mrs. Warren, Madge McIntosh as Vivie, George Goodhart as Sir George Crofts, Julius Knight as Praed, Harley Granville-Barker as Frank, and Cosmo Stuart as Rev. Samuel Gardner. It wasn't until 1925, over thirty years after it was written, that Mrs. Warren's Profession was performed publicly in London.
The history of the play in the United States began in 1905, when it opened in New Haven, CT and in New York City. Opening night in New York sold out; even as critics complained that the play was indecent, tickets were scalped for as much as $30. After the first performance, the house manager was arrested for disorderly conduct and the entire cast was ordered to appear in court. The company was eventually acquitted, but the production had been closed down after opening night.
Since then, the play has been revived on Broadway five times, most recently by the Sydney Theatre Company in 2012. In 2010, Shaw's play was revived three separate venues: the Comedy Theatre in London's West End; Sidney Harman Hall in Washington, D.C. by the Shakespeare Theatre Company; and on Broadway at the American Airlines Theatre by the Roundabout Theatre Company.