Maggie Gyllenhaal is heading back to TV.

The Honourable Woman star has joined David Simon’s 1970s-1980s porn drama, The Deuce. She joins James Franco as a producer and star in the long-in-the-works project, which is expected to begin filming in New York in October. Gyllenhaal will play Eileen Merrell — or "Candy" on the street — a Times Square hooker and veteran with an entrepreneurial bent who is drawn into the fledgling porn industry.

The Deuce follows the story of the legalization and subsequent rise of the porn industry in New York starting in the early 1970s and continuing through the mid-1980s. The entry will explore the rough-and-tumble world that existed in midtown Manhattan until the rise of HIV, the violence of the cocaine epidemic and the renewed real estate market all ended the bawdy turbulence. Named for 42nd Street, The Deuce is inspired in part by the career of twin brothers who were players in the Times Square world and became fronts for mob control of the volatile and lucrative sex industry from its beginning.

Read More: David Simon Reveals Plans for 1970s Times Square Porn Project at HBO

"We’re interested in what it means when profit is the primary metric for what we call society. In that sense, this story is intended as neither prurient nor puritan. It’s about a product and those human beings who created, sold, profited from and suffered with that product," said Simon when the project first was ordered to pilot, with his longtime collaborator George Pelecanos adding: "Porn, prostitution, pimps, the mob, after-hours nightlife, institutional corruption and New York in its Wild West heyday ... it’s a world rich in character and a fascinating story we’re eager to tell."

The drama is being written by Simon and Pelecanos, with Nina K. Noble and Richard Price involved as executive producers. Breaking Bad’s Michelle MacLaren is on board to direct the pilot.

Read More: Taraji P. Henson, Viola Davis and Drama Actress A-List Tackle Race, Sexism, Aging in Hollywood

Gyllenhaal is repped by WME and MGMT Entertainment.