GROWING up in Rockford, Ill., the television writer and producer Shawn Ryan, 44, was always fascinated by Chicago, the big, bad metropolis just 90 miles away. So when his acclaimed series “The Shield” ended its run on FX in 2008, and he began to think about what he might want to do next, Chicago naturally popped into his mind.

“As a kid I’d travel there to play soccer or hockey or see pro sports, and I was always in awe of the place and curious about its people,” he said. “It’s a well-run, world-class city but with a history of favor swapping and corruption, which people accept as the way it is, and that dichotomy was interesting to me. I didn’t want to do just another cop show after ‘The Shield’ ”  set in Los Angeles  “and moving my focus to Chicago allowed me to look at how the city works and expand to corruption and undercover police work.”

Two years later that curiosity has given birth to “The Chicago Code,” an hourlong drama that is to have its premiere on Monday at 9 p.m. on Fox. And true both to Mr. Ryan’s initial creative impulse and his childhood impressions of the city, the series has a story line set right at the intersection of politics and crime, derived from the notorious maxim attributed to an alderman and saloon keeper named Paddy Bauler, “Chicago ain’t ready for reform.”

“The Chicago Code,” shot on location, has three main characters. Teresa Colvin, played by Jennifer Beals, is the city’s first female police superintendent. Her efforts to bring down the corrupt, Mafia-friendly alderman Ronin Gibbons (Delroy Lindo) lead her to grant her former patrol car partner, Detective Jarek Wysocki (Jason Clarke), license to combat wrongdoing wherever he finds it.