BEFORE it becomes “Apocalypse Now” in the custody war over Char­lie Sheen’s twin boys, his screen-legend dad Martin Sheen is racing to the rescue.

Martin wants Charlie’s 4-year-olds – Bob and Max – placed temporarily with Charlie’s brother, actor Emilio Estevez, 51.

“Martin is imploring Charlie’s older brother, Emilio, to request temporary custody of the twins.

“Unlike Charlie, Emilio has led a very stable, down to earth life,” said the source. “He’s raised two terrific, well-adjusted kids – son Taylor, 29, and Paloma, 27. And he’s been in a secure, at-home relationship with fiancee Sonja Magdevski since 2005.”

The two operate a small winery in Malibu.

Being with Emilio would keep the twins out of the ugly battle Char­lie’s fighting with ex-wives Brooke Mueller and Denise Richards.

The twins’ drug-plagued mother Brooke, 36, was previously labeled an “unfit mother” and photos re­cently surfaced of one of the twins with an apparent burn on his face after staying with her last summer.

And Denise, 42 – who’s been caring for the boys for the past few months – told the court she can no longer take care of little Bob and Max because of their violent behavior toward her daughters and dogs.

On Nov. 8, a California court ruled that the youngsters would be re­turned to Brooke’s care, under the condition her brother Scott would serve as their temporary guardian.

The ruling enraged the former “Two and a Half Men” star.

“Charlie is furious because Scott is asking him for a whopping $55,000 a month to care for the twins,” dis­closed a close source. “He’s disgusted by Brooke and her family – he thinks they’re all just a bunch of leeches.”

Desperately hoping for a better solution, Charlie’s dad Martin is pleading with Emilio to step in but it’s uncertain he will. He and Charlie have had a falling out over Charlie’s substance abuse.

“But Martin sincerely believes Emilio can help Charlie out now, and that it would also go a long way to mending their strained relationship,” said the source.

Meanwhile, Charlie continues to blow off steam.

In several harsh tweets, the 48-year-old, three-times-married sitcom star blasted Brooke as a “chubby weirdo” and a “whore.”

The judge dragged Charlie into court recently, telling him he’s going to jail if he violates a gag order not to talk about the case again.

Almost forgotten in the vicious war of words are the twins, who will soon undergo testing for fetal alcohol and drug syndrome. Two of Brooke’s many rehab stints occurred while she was pregnant with them.

Renowned Pennsylvania-based child psychologist Dr. Jay Carter, who has not treated the twins but is an expert on children’s mental health, told The ENQUIRER: “Charlie’s kids need a stable environment. The disruption in their lives can trigger night ter­rors and extreme mood swings. The ability to feel safe and bond with a parent is crucial at their age and every attempt should be made to make this happen.”