WASHINGTON — Four years after Justice John Paul Stevens retired from the Supreme Court in 2010, his wife, Maryan, threw a surprise party for his 94th birthday. The gathering of old friends summoned vivid memories of a long and eventful life, and it gave him an idea. He should write a memoir.

“I just started writing after that party,” Justice Stevens said by phone the other day from his home in Fort Lauderdale, Fla. “It kind of set me off.”

The book, “The Making of a Justice: My First 94 Years,” will be published in May, not long after Justice Stevens’s 99th birthday.

“It’s a long story,” Justice Stevens said.

He was born to a prominent Chicago family that operated what was then the largest hotel in the world, the Stevens Hotel, with 3,000 rooms. He met celebrities like Amelia Earhart and Charles Lindbergh, and he was at Wrigley Field for Game 3 of the 1932 World Series to see Babe Ruth’s fabled called-shot home run.