Comic James Hannah, a local club favorite who went on to write for Steve Harvey and Chris Rock, has died, according to friends and family.

Mr. Hannah, 45, a Lane Tech alum, collapsed at his Dallas-area home Monday, said his brother, Phillip.

He broke into the business with open-mic nights at Chicago’s Funny Firm. Mr. Hannah began opening for headliners like Harvey, who met him at Chicago’s All Jokes Aside comedy club, said Raymond Lambert, former owner of the club and producer of the movie “Phunny Business: A Black Comedy.”

“Even then, he was a very, very talented writer,” Lambert said. “I think I would classify it as observational. I think he had very good insight into human nature and observations and could be very brutal and very honest in that delivery, which sort of set him apart.”

Harvey liked what he heard and hired him to write for his WB sitcom, “The Steve Harvey Show,” for the six years it aired, according to Lambert and Phillip Hannah.

Mr. Hannah also appeared at Chicago’s Cotton Club on bills with headliner Bernie Mac, said comedian Godfrey Danchimah, another Lane Tech alum.

He wrote for TV’s “Meet the Browns,” “My Wife and Kids” and “Cedric the Entertainer Presents.” He appeared on “P. Diddy Presents the Bad Boys of Comedy” and BET’s “Comic View.” For Chris Rock, he wrote for the comedian’s “Bigger & Blacker” HBO special, his brother said. Mr. Hannah also weighed in on current events and issues in the African-American community in YouTube snippets he called TruthPaste.

Among the performers tweeting about his death Monday were comedian London Brown and Damon Wayans Jr., who appears on TV’s “New Girl.” Comic Deon Cole called him a mentor, friend and one of the “greatest writers.’’

“James taught me how to write,” Cole said. “He even wrote a few of my bits that I still do to this day. He was the greatest to ever do it, period.”

In a tribute on the Humor Mill website, Shawn Harris wrote that “every time he would see me do stand-up he would come up to me and help me ‘bump up’ my material . . . Which would make it even stronger . . . he was very witty, smart and clever . . . Gonna miss this dude.”

“He’ll be remembered as a very smart comedian. He wrote a lot. He did a lot of edgy material, spoke his mind. Sometimes he put his foot in his mouth, but he was unapologetic,” said Danchimah, who recalled Mr. Hannah doing stand-up in the halls of Lane Tech in the mid-1980s.

When comedians departed the stage, they might find a waiting Mr. Hannah, who offered to tweak and improve their jokes. Sometimes, it got on their nerves. But his fine-tuning often helped. “A lot of times, you would use it and it actually worked,” Danchimah said.

“James Hannah was a genius at writing,” said Mary Lindsey, owner of the Chicago club Jokes and Notes. “When he performed at All Jokes Aside he used to always say to me, ‘Mary Lindsey, they not gonna see me coming’ — meaning he was headed to LA to make something happen, and he did.”

After work in Los Angeles was affected by the writers’ strike, Mr. Hannah moved with his family to Dallas, where he was planning to write for a radio show, his brother said.

He grew up in the South Shore neighborhood. His early comedic influences included Eddie Murphy, Richard Pryor and Robin Harris, his brother said.

When he moved away, Mr. Hannah missed Harold’s Chicken and Garrett’s Popcorn, Phillip Hannah said.

In addition to his brother, he is survived by his wife, Crystal; his children, Christopher, Cameron and Chloe; his parents, Essamina Freeman and James Hannah, and his sisters, Leah Hannah and Charisma Griffin.

Services are expected to be held in both Dallas and Chicago, his brother said.

Email: modonnell@suntimes.com

Twitter: @suntimesobits