Ryan, 60, will direct and star in the film What Happens Later with Duchovny, 61.
What Happens Later is based on the Steven Dietz play Shooting Star. Dietz wrote the screenplay with Ryan and Kirk Lynn.
Bleecker Street has acquired the U.S. rights to the film and is planning a 2023 theatrical release. HanWay Films will handle international sales and launch the title at Cannes this month.
Production will begin in Bentonville, Ark., later this year.
What Happens Later follows Willa (Ryan) and Bill (Duchovny), two ex-lovers who reunite for the first time since their split decades prior when they both are snowed in at an airport overnight.
"All each of them wants is to get home but over the course of the night they find themselves at first reluctantly drawn together yet compelled to revisit their past, along with what could have been and what might well be again. But when the versions of their shared history don't quite add up, where do they go from there?" an official synopsis reads.
Jonathan Duffy, Kelly Williams and Kristin Mann will produce the film, with Kerri Elder, Blake Elder, Andrew Karpen and Kent Sanderson as executive producers.
"We couldn't be more thrilled to have the incredible teams at Bleecker Street and HanWay alongside us as we bring this special story to the screen. We believe it's a look at life and love that audiences the world over will relate to and hunger for in these uncertain times when connection and reconciliation feel more important than ever," the producers said.
Ryan is known for such films as When Harry Met Sally..., Sleepless in Seattle and You've Got Mail. Duchovny played Fox Mulder on The X-Files and Hank Moody on Californication.