Joe Jonas seemingly found some comfort in his brother, Nick Jonas ... grabbing dinner in the night before his estranged wife, Sophie Turner, slammed him with a lawsuit over the custody of their kids.
Two-thirds of the Jo Bros were at The Waverly Inn in NYC Wednesday night -- and Joe seemed to be deep in conversation with Nick as they dined.
BTW, this spot is a couple blocks away from where Sophie was hanging out with Joe's other ex, Taylor Swift, the night before.
She was also spotted at The St. Regis Hotel in New York on Thursday, hours after suing her estranged husband ... so they're still not that far from each other.
As we reported, Sophie claims Joe is illegally keeping their 2 kids in New York and wants them brought back to England, as laid out in an explosive lawsuit she filed Thursday morning.
Sophie says she agreed -- "with some hesitation" -- to let the kids stay with him while he was touring in the U.S. because she was working on her time-consuming series overseas, but that agreement was supposed to last until September ... when she would "collect the children and return home to England."
She even cited an international treaty that deals with child abduction across country lines ... so she's keeping pretty serious about getting her kids back to her.
In response, Joe's rep issued a lengthy statement ... saying Sophie's wishes would violate an order that restricts both parents from relocating the children," also reiterating that he's open to sharing custody with her if she moves to England full-time.
Do you think the Sophie Turner/Joe Jonas divorce war will get uglier? Vote below.