Thomas Beatie says he's been keeping a shocking secret ... not that he's a man who gave birth, but that his ex-wife allegedly had been locking their kid in a cage.
Phoenix cops visited the home of Beatie's ex in late September and contacted child services after their 5-year-old son told an employee at his school when he was bad, his mom would put him in a dirty cage ... this according to the police report.
Cops say Beatie's ex-wife told them she'd never do anything like that and the couple's 2 other kids backed her up.
Thomas says the child who made the claim never backed down ... nevertheless, investigators closed the case for now due to a lack of evidence.
As for Thomas ... he'll be sentenced Monday after pleading guilty to one count of disorderly conduct. He had been charged with stalking his ex with a GPS when they were still married.