Alexander McCall Smith has won the Bollinger Everyman Wodehouse Prize for his novel Fatty O'Leary's Dinner Party.
The annual award celebrates books that capture author PG Wodehouse's comic spirit.
The novel tells the story of an Irish-American antiques dealer whose trip to Ireland goes farcically wrong.
As part of the prize, awarded at the Hay Festival, a Gloucestershire Old Spot pig will be named after the winning title.
McCall Smith beat competition from a six-strong shortlist that included Helen Lederer, Caitlin Moran and Irvine Welsh.
Born in 1948 in Zimbabwe, he has published more than 50 books including the No 1 Ladies Detective Agency series, The Sunday Philosophy Club and 44 Scotland Street.
He was also once the part-owner of a small pig farm on the west coast of Scotland.
"I very much enjoyed writing that book and if there are those who are enjoying reading it, then I am content," McCall Smith said.
"I am also content with the jeroboam of champagne, the 52 Wodehouse novels, and the pig that go with this award. That is what I would call a very well-balanced prize."
Judge James Naughtie said: "It's right and proper to couple the names of Alexander McCall Smith and PG Wodehouse. No writer in recent times has been a more prolific dispenser of wit.
"He makes people laugh out loud and, like everyone who understands the absurdities of life, he understands sadness too."
Previous Wodehouse Prize winners including Edward St Aubyn, Howard Jacobson, Marina Lewycka and the late Sir Terry Pratchett.
McCall Smith will receive his prize at the Hay Festival in Wales on 26 May.