J. P. Donleavy, the expatriate American author whose 1955 novel “The Ginger Man” shook up the literary world with its combination of sexual frankness and outrageous humor, died on Monday at a hospital near his home in Mullingar, County Westmeath, Ireland. He was 91.

His sister, Mary Rita Donleavy, said the cause was a stroke.

Mr. Donleavy had considerable trouble finding a publisher for “The Ginger Man,” his bawdily adventurous story of 1940s university life in Dublin, which he described to The New York Times in 2000 as “celebratory, boisterous and resolutely careless mayhem.”

The playwright Brendan Behan, a friend, suggested that Mr. Donleavy send the manuscript to Olympia Press in Paris. This worked out well, in that Olympia accepted the book, and not well, in that it was published as part of the Traveler’s Companion series, which was known for erotica.

“That was basically the end of my career,” Mr. Donleavy told The Times. “I was ‘a dirty book writer’ out of Paris.” In fact, he went on to write many other successful novels.