We broke the story ... B.A.G. sued his baby mama/former "90210" co-star Marcil ... claiming he began lending her money in 2000 ... and when he came to collect the roughly $200k debt in 2011, she told him to pound sand.
But today, an L.A. County Superior Court judge ruled ... Green had waited too damn long to pursue legal action against the mother of his 10-year-old son ... and the statute of limitations had run out.
And it gets worse for Brian ... 'cause the judge also told Marcil she can seek monetary sanctions from Green for what her lawyers called a "frivolous" lawsuit.
Bad day for Green ... but he still gets to bang Megan Fox ... so it's probably a wash.