Lil Baby's going to war with the baby mama of his 5-year-old son, and it's gone beyond social media squabbles ... they've now taken it to court.
Here's what's up -- the rapper has been going back and forth with Ayesha Howard for weeks after she accused him of failing to pay for their son Jason's schooling, which she says resulted in the boy being kicked out.
Ayesha then filed legal docs -- obtained by TMZ -- seeking a declaration of paternity and child support from Lil Baby, claiming he has a net worth in excess of $4 million ... which includes money he makes on various endorsement deals. She says one of these deals involves the use of a photo of their son.
She also claims Lil Baby owns at least 7 luxury vehicles, including 2, million-dollar Lamborghinis. By contrast, Ayesha claims she makes less than $25k per year.
In response ... the rapper fired back with legal docs of his own, claiming he already covers "all expenses for the care, support and maintenance" of their son, along with providing regular support payments.
On top of that, Lil Baby wants the court to grant joint legal custody of Jason ... and he's seeking primary physical custody.
Ayesha claims Lil Baby has never sought primary custody before, and alleges it was done "in a retaliatory fashion and in an attempt to punish, harass, threaten and intimidate."
She says Jason has been under her primary care and custody since he was born and nothing has changed ... except for her seeking financial support.