Sharpe James posed for a portrait at his home in Newark earlier this month.

NEWARK—Cory Booker will be a better U.S. Senator than he was a mayor in New Jersey’s largest city, a job he was “never happy” with, Newark Democrat Sharpe James said during a public forum Tuesday night.

Mr. James, the former five-term city mayor, famously sparred with Mr. Booker a decade ago and decided not to run against him in 2006. But Mr. James gave an unexpected endorsement of Mr. Booker in last week’s senate race, and he said the Democrat was a far better candidate than his adversary, Republican Steve Lonegan.

Messrs. Booker and Lonegan faced each other in a special election to fill the unexpired term of Frank Lautenberg, who died in June.

More than 150 people attended the event Tuesday at the Newark Public Library, where Mr. James was interviewed on stage about his book and auctioned off some of his personal mementos to benefit the library.

The friendly crowd gave rounds of applause to Mr. James. People crowded to snap photos with him and bid on his collection—including a photo of Whitney Houston, historic images of Newark and ceremonial shovels used at ground-breakings over the years.

Mr. James was indicted on fraud charges in 2008 and sent to federal prison, where he wrote most of the book. He was released in 2010.

“In prison I found the interest, the time, the motivation to write,” said Mr. James, who was interviewed by Rutgers-Newark professor Clement Price on stage. “I was angry and mad.”

In the memoir, Mr. James argued his innocence and chronicled his rise from poor roots in Florida to becoming one of New Jersey’s most powerful Democrats.

“If anybody can tell me why I went to prison,” Mr. James said to applause, “I’ll give them a thousand dollars.”

As for Mr. Booker, Mr. James said that the outgoing mayor brought resources to the city that he didn’t have access to. Mr. Booker is credited with bringing millions of dollars of philanthropy and development to New Jersey’s largest city.

“He brought attention,” Mr. James said about Mr. Booker in Newark. “He knew people I didn’t know.”

Asked by an audience member if he would run again for mayor, Mr. James said he would have to clear his federal conviction, which he has continued to appeal. But the 77-year-old Democrat said it was also time for a new generation in the city.