Jessica Biel Hard at Work Filming New Show ... Before Justin's Arrest

Jessica Biel spent Monday working on her new show in NYC ... hours before her hubby Justin Timberlake was booked in the Hamptons for driving under the influence.

The actress was photographed in NYC filming the TV adaptation of Alafair Burke's novel "The Better Sister," alongside Elizabeth Banks and Corey Stoll. Ironically, the new show is a crime thriller ... which perhaps now hits a little close to home following JT's arrest.

Jessica's set was not too far from where Justin's arrest occurred ... and this seems to explain what JT was even doing in town. As it turns out, his wife was working nearby.

As we reported ... the singer was pulled over by the cops late Monday night after he allegedly blew through a stop sign and swerved on the road. Per our sources, Justin was given a field sobriety test ... which we're told he failed, resulting in him being cuffed.

JT spent the evening behind bars, as he was arraigned and released without bail Tuesday morning. We got a hold of photos of him leaving the police station with his attorney.

While Jessica has yet to address her husband's DWI bust, she did recently pay tribute to the *NSYNC alum in honor of Father's Day. In a glowing upload to Instagram, Jessica -- who shares sons Silas and Phinneas with Justin -- praised the singer as their family's "rock."

She wrote ... "You’re so many things to so many people. But to us you are THE ROCK. The rock we climb on, we lean against. The rock that shades us from the sun. And when we recline on you, as we always do, hopefully our butts will keep you eternally grounded and warm. We LOVE YOU."

TMZ Studios

Fans are now flooding her comments for this post ... with some saying it hasn't aged well.

Click here for info about our online advertising practices.