WITH an ugly divorce battle brewing, the es­tranged husband of “The View” co-host Sherri Shepherd vows to protect her son from the growing scandal – and he wants custody of the baby they are expecting by surrogate!

“Sherri’s son Jeffrey is like my own, and I don’t want to hurt him,” TV writer Lamar “Sal” Sally told The ENQUIRER.

“I don’t want to say anything bad because of him. I don’t want him to see anything in the media that could cause him to suffer.”

Sherri, 47, tied the knot with Sally in a glitzy ceremony in August 2011.

But in what’s shaping up to be one of Hollywood’s most bitter splits, Sally has filed for legal separation and wants full physical custody of the unborn baby boy, named Lamar Sally Jr., that a surrogate is now carrying.

Following Sally’s court action, Sherri filed separately for divorce in New Jersey, citing irreconcilable differences.

According to court papers filed in Los Angeles, Sally has requested that Sherri be granted only visitation rights for the new child. He also wants their prenuptial agreement invalidated on grounds of fraud.

As for the reason behind the split, Sally told The ENQUIRER: “It wasn’t anything in particular. We just have different views of marriage.”

Talented actress/comedian Sherri is worth an estimated $10 million and has kept quiet about her marriage woes and the impending birth of their child.

After the shocking news made headlines, Sherri taped “The View” on May 12, but did not address it.

She’d announced on the syndicated “Rachael Ray” show in September 2012 that she and Sally were seeking a surrogate. The baby is due July 28, according to Sally.

It will be the second child for Sherri, whose first marriage exploded in scan­dal after her husband, comedian Jeff Tarpley, admitted to fathering a child with a mistress around the same time Sherri gave birth to Jeffrey in 2005.

Sherri had been pregnant with twins, but lost one baby at 11 weeks.

She separated from Tar­pley in 2010 after nine years of marriage, and the two share custody of Jeffrey.

Sherri – who joined “The View” gabfest in 2007 and has also ap­peared on TV sitcoms “Ev­erybody Loves Raymond” and “30 Rock” – believed she’d found true love when she met Sally, pals say.

But the marriage got off on the wrong foot when he asked Sherri to include his pal, Wendy Peel, as a bridesmaid. After the wedding, the cad revealed Peel was his college sweet­heart, and they’d been hooking up right up to the time he began dating Sherri.

While Peel has denied being in­volved with Sally, “it certainly wasn’t a good way to start a marriage,” said a friend.

After that, “Sherri and Sal just never got on the same page about what they wanted in their marriage,” added the friend.

“Last year, Sherri talked about how they were investigating having a baby by a surrogate mother, so she could have a sibling for her son Jeffrey.

“Then Sal got cold feet and said he didn’t want a child. They had arguments and would go for days without speaking to each other. Now, whatever his motives are, Sal is trying to take that baby from Sherri.

“Sherri’s been burned twice now in marriage. It’s too bad because she certainly deserves better.”

But Sally denies he’s trying to hurt his estranged wife.

“We will get things worked out,” he told The ENQUIRER. “We just grew apart.”