Tony Gilroy is a jedi of screenwriting. He was a longtime Hollywood script fixer, wrote most of the Jason Bourne movies and was Oscar-nominated for “Michael Clayton,” a George Clooney legal thriller that film buffs and fellow writers speak of in reverential tones.

If only Gilroy, 68, could sell everyone on the show he spent the last six years crafting.

“I can’t get people who have loved all my work to watch it because, you know, it’s Star Wars,” he said. “It just drives me crazy.”

Cassian Andor (Diego Luna) in Lucasfilm’s ANDOR, exclusively on Disney+. ©2022 Lucasfilm Ltd. & TM. All Rights Reserved.

“Andor,” the series he created , has a rarefied place in a galaxy far, far away. Hits like “The Mandalorian” have been harder to come by in recent years for the franchise, which has dealt with canceled movie projects and panned TV shows. That has raised fears of stagnancy among a fan community that’s been more pissed off than passionate.

“Andor,” which debuted in 2022 and earned an Emmy nomination for best drama series, became a bright spot for fans and the franchise’s reputation, if not a ratings hit.

It’s a show for grown-ups featuring spycraft, heists and sophisticated political themes. Nobody brandished a lightsaber or mentioned the Force in the first season. The plot follows the sketchy beginnings of a rebel movement that exists as a staple of the Star Wars movies. “Andor” devotes equal time and human detail to the bad guys, an array of career-obsessed intelligence agents trying to ferret out an insurgency.

The story expands in the second and final season, launching April 22. The rebels (including the title character, a mercenary-turned-leader played by Diego Luna) fight among themselves and reckon with the bloody costs of escalating a revolution. Imperial bureaucrats use this insurrection as cover for a fascist power grab, planting news in the galactic media and implementing draconian laws.

“It’s the best thing I’ve ever done. It’s the biggest thing I’ll ever do,” Gilroy said, reciting his sales pitch to friends who are hesitant or oblivious about the show. “Get the freaking Disney+ app. If you don’t like the show, write me, I’ll send you a check.”

The head writer and showrunner of “Andor” controlled his corner of the Star Wars universe from a cozy home office on the Upper West Side of Manhattan in New York. The townhouse where Gilroy has lived for 25 years became his headquarters when the pandemic halted preparations for “Andor,” then he kept it that way.

At a desk on the ground floor, with a trio of prints by artist Robert Mangold at his back, he wrote scripts and honed those by other writers, including “House of Cards” creator Beau Willimon and Dan Gilroy, Tony’s brother. (His other brother, John Gilroy, was an executive producer and the editor of “Andor.”)

Using a proprietary Lucasfilm portal, Gilroy had all the raw materials for “Andor,” from audition videos to daily footage from the set. That allowed him to oversee a cast and crew of more than 2,000 people, most of them operating in a studio complex outside London.

“The entire show was run from that cockpit,” he said during a recent interview there. “From 6 o’clock in the morning until the second vodka at the end of the day.”

It’s easy to see the political turmoil of 2025 in the plotlines of “Andor.” A senator who funnels secret funding to the rebellion (Genevieve O’Reilly) gives a speech invoking the gulf between truth and the government’s version of it. Protesters who face off with imperial forces chant “the galaxy is watching.”

Gilroy plays down the show’s parallels to real-world news cycles, saying the writers were drawing from history’s repeated patterns of uprising and clampdown.

He was into all this before “Andor.” “I never really spent much time in school, so you learn how to teach yourself as life continues,” Gilroy said. The son of a screenwriter and Pulitzer-winning playwright, Frank D. Gilroy, he dropped out of college to play music and tend bar while establishing his own writing career.

In the sitting room adjoining Gilroy’s office, Alexei Navalny’s memoir of his battle against Vladimir Putin tops a stack of books; on another stack, a thick novel set amid the Stalinist purges of the 1930s, Yuri Trifonov’s “The House on the Embankment.”

Elsewhere there are books on the insurrections of Toussaint L’Ouverture in Haiti, Mao Zedong in China and Emiliano Zapata in Mexico. Gilroy ate up a multiseason history podcast called “Revolutions,” and ranks Hilary Mantel’s novelization of the French Revolution, “A Place of Greater Safety,” as one of the best books he’s ever read.

Gilroy remembers going to the original “Star Wars” in 1977 and the excitement of being part of a mass happening. But he wasn’t much interested in the narrative saga that carried on in later sequels and prequels.

That detachment made Gilroy a mercenary when he was hired to revise a Star Wars script that would become the 2016 movie “Rogue One.” It was set in a time leading up to the original Luke Skywalker trilogy, and introduced Diego Luna’s character, Cassian Andor. Gilroy’s overhaul of the movie resulted in the franchise’s most hard-bitten version of the hero’s quest to date. In the main characters’ mission to steal the blueprint for the infamous Death Star, they sacrifice their lives.

As a long-form prequel to “Rogue One,” “Andor” is about the radicalization of Luna’s character. In season 2 he clashes over strategy with the architect of the rebellion, played by Stellan Skarsgård. The character, who leads a double life as a smiling antiquities dealer, pushes for explosive action, no matter the cost in lives, to trigger full-scale revolt.

Gilroy compares Skarsgård’s character to a tech founder: “He built a startup company in his garage and it has to go public, but secrecy doesn’t scale up well.”

Before he signed on as showrunner, Gilroy said, he had months of discussions with executives at Disney and Lucasfilm about his intention to ”take the Latin mass out of the Church.” There’d be no jedi knights; there would be a brothel.

Once under way, however, the executives let Gilroy and his team cook, he said. “It will sound insane, but we really didn’t have any notes on this show, ever.”

“We had economic issues,” he added. “A lot of them.”

Unlike other Star Wars productions that use virtual settings displayed on wraparound screens, “Andor” came to life on intricate physical sets. Season 1 was produced when the streaming war was still hot, and companies were spending heavily to stockpile premium content.

“It was like an arms race. Go, go, go,” Gilroy recalled.

By season 2, the whole industry had reined in production budgets. While producing about new 10 hours of television, Gilroy had to repeatedly ask executives for more money to visit additional planets and mount bigger set pieces, such as a lavish wedding that spans several episodes.

The budget skirmishes involved “a lot of emails that everyone wants to forget,” and the showrunner had to roll with the resources available. “Some days you’re Ho Chi Minh, some days you’re Napoleon,” he said.

The “Andor” writers had unwritten commandments for their scripts: “No cynicism. No winking. Total truth all the time, without pretension,” Gilroy said. “Every character, totally vivid…and keep the freaking thing moving, because you’re carrying 15 to 20 characters.”

Some of the show’s most bracing scenes unfold in a conference room. Staffers in the Imperial Security Bureau compare rebel intel while jockeying for leverage in their jobs.

The “Andor” team wanted their actors grounded, too: “Don’t play Star Wars for us,” Gilroy said. “There’s an altitude sickness that people get when they come on these shows. I think the reverence is beautiful, but it’s not helpful.”

For season 2, episodes will drop in four weekly batches of three episodes each, which correspond to time jumps in the story that spans four years total. As “Andor” concludes, Gilroy is exiting the Star Wars universe, he said, then added, “I mean, never say never.”

Write to John Jurgensen at John.Jurgensen@wsj.com