Heartbreak and tragedy threatened to overwhelm comedian Bernie Mac — but he turned despair into hope by calling on his beloved mother’s words of wisdom.

Now, in a fascinating new autobiography, the star of the Emmy-winning “Bernie Mac Show” reveals the dramatic details of his battle to get from Chicago’s tough South Side into the Hollywood spotlight — and The ENQUIRER has this exclusive sneak preview.

“When his mama died from breast cancer, Bernie used her wise words, which he terms ‘Mac-isms,’ to help guide him out of the ghetto and into the hearts of millions of fans,” divulged a publishing source familiar with his new book “Maybe You Never Cry Again.”

Bernie grew up in an old house that the city tore down after it became infested with rats. Meals consisted of eating cheap, fattening foods and convincing yourself it tasted good.

“At age 11, when he saw his mama laughing out loud watching ‘The Bill Cosby Show,’ he saw the power it had on her,” said the source. “He knew that’s what he wanted to do.”

Sadly, when Bernie was 15, he lost his mother.

At the end of her life, he learned his biological father never married his mother — and he was crushed.

Bernie went to live with his grandparents, but he relied on his late mother’s words to get him through difficult times. “Suffering,” she had told him, “is the best teacher of all.”

Unfortunately, he’d get plenty of experience.

His brother Darryl dropped dead at 26 from a heart attack.

In high school, the budding comedian fell for Rhonda McCullough. She became pregnant, and they married when Bernie was only 19.

To keep food on the table, the aspiring comedian shoveled scrap iron, chased rats, did heavy lifting for a moving company, made a clean sweep as a janitor, delivered bread, lifted 400-pound refrigerators for Sears, drove a school bus, and fried fish 14 hours a day for $3.25 an hour.

Hard-driving Bernie also became a student of comedians, closely observing all the great ones, including his two heroes — Jackie Gleason and Redd Foxx.

But his personal life often brought more tears than laughter.

His grandmother died from diabetes and his grandfather suffered a stroke.

While learning his craft on the comedy circuit, Bernie got booed off the stage and was pelted with rolls and doused with drinks. Nothing bothered him much — until he got hit in the forehead with a powerful M-80 firecracker that sent him bleeding to the hospital.

During a 1990 trip to Las Vegas, Bernie met his hero Redd Foxx — who offered him a brief spot opening his stage show. Word soon spread about the funny young comic. He landed on “Def Comedy Jam” and “Moesha” — and began making hit movies.

Thanks to his mother, he never stopped pursuing his dream.