In a bid to beef up the show’s slumping ratings, “Ally McBeal” producer David Kelley is giving Ally a 10-year-old daughter!

“Ally sold her eggs while in college — and this girl is the result,” an insider tells The ENQUIRER.

“Her parents are dead and she comes looking for her biological mother.”

Baby McBeal will show up on Ally’s doorstep during the February sweeps.

And here’s a fresh twist: Bad-boy Robert Downey Jr. — who nabbed a Golden Globe for playing Ally’s beau last season — will reappear during May sweeps.