Attica Locke is wearing cowboy boots, visible under the trousers of her pantsuit. We’re at a café in Los Angeles chatting about Bluebird, Bluebird (Little Brown, Sept.), her fourth mystery novel. Locke’s books are all set in her native Texas, and she speaks enthusiastically about her roots. “The older I get, the more affection I have for where I grew up,” she says. “I have a huge collection of cowboy boots. They make me feel like I’m literally standing on where I’m from.”

After moving from Houston to attend Northwestern University in Illinois, Locke planned to become an independent filmmaker and director. In 1999, as a fellow at the Sundance Institute’s Feature Filmmakers Lab, she studied screenwriting and directing. “But I had to admit to myself that I might not have the fortitude to be an indie filmmaker,” she says. “I might not love it enough to do it, to hang out with a film idea for the amount of time it can take to bring it to the screen. And 20 years ago, indie movies were rarely made by black people. I had to let it go, and that was painful.”

What appealed to Locke, she realized, was writing, and she became a successful screenwriter for every major studio in Hollywood. None of her scripts were produced but she made a lot of money in the process. Then, while she was in New York doing research on the screenplay for a remake of Wait Until Dark, she had a prescient dream. “I was working in a film colony where we all lived and worked together,” she says. “There was some big premiere that everyone was going to, but I was on janitorial duty that night. I was cleaning up with some other women, and I stood there with the broom and said, ‘I don’t want to do this anymore. I’m done.’ And I woke up crying. I felt like I was dying inside. So I went into Endeavor, where my agent was, and told her I was done, and everyone in the office looked at me and said, ‘Are you crazy?’ ”

Locke says it was the best thing she could have done for herself. In 2005, she and her husband, a public defender, took a loan on their house, and Locke spent the next year writing Black Water Rising (Harper, 2009). It was nominated for an Edgar Award for best first novel and a Los Angeles Times Book Prize; it was shortlisted for the Orange Prize in the U.K., and it established her as a respected bestselling novelist.

“I was figuring everything out by trial and error, completely on my own,” Locke says of her early fiction writing. “It wasn’t until I read Pete Dexter’s Brotherly Love, which is in the present tense, that I thought, I can do that. Present tense is my mother tongue. All I had to do was write what I saw, and it made me put away literary airs. Also, I’m not afraid to start shit over.”

Locke’s second book was The Cutting Season (Harper/Lehane, 2012), her third was Pleasantville (Harper, 2015). By then, she was committed to writing mystery novels. An unexpected call from her theatrical agent about a new television drama called Empire did prove irresistible, though, and she signed on as writer and producer for the show’s first three seasons. (But in order to focus full-time on writing books, Locke recently resigned from Empire and will leave at the close of the current season.)

In Bluebird, Bluebird, Locke’s protagonist is Darren Mathews, a black Texas Ranger investigating a murder in a small east Texas town. Mathews is a compelling character, educated and compassionate, devoted to maintaining a complicated peace between the black and white residents along Highway 59. The Aryan Brotherhood of Texas is another player in the story, which makes Bluebird simmer with tension. It’s clear at the book’s end that Bluebird is the first in a series, something Locke hasn’t tackled before.

“When I wrote that ending I said to myself, ‘Oh, shit, that’s a promise, Attica!’ ” Locke says. “I’m nervous. I never intended to write a series, and I’m sure writing for television was a part of that decision. Working on Empire gave me an appreciation of and a love for serialized story telling, which was a real gift.”

Successfully straddling the line between television writing and fiction, Locke sees the two mediums merging. “I think they’re starting to mirror each other more and more,” she says. “Especially the more we consume TV in time chunks of our own choosing. Streaming feels like picking up a book and putting it down and picking it back up again.”

Locke feels fortunate that she is comfortable in both the culture of Hollywood and the culture of publishing. “But when I’m in either world,” she adds, “I’m aware that my experience is slightly different than most other people in the room.”

Locke mentions more than once—as well as in Bluebird—the horrifying murder of James Byrd by racist white men in Jasper, Tex., in 1998. “I felt both rage and shame when Jasper happened, because Texas is where I come from,” she says. “It was really painful, but I also felt that wasn’t the whole of the Texas that I know and love.”

Locke recently returned from a research trip to east Texas for the next Mathews book. She says her father, an attorney, went with her because she was anxious about being there alone. In fact, she made him bring a pistol. “I hate guns,” she says, “but we were going to be in an isolated cottage out in the woods near Caddo Lake.”

The trip was enlightening, Locke says. “My dad is an affable, nonjudgmental person until he has a reason to judge. So I’m looking at people in overalls: white folks, real rednecks, getting out of pickups, and my dad is saying things like, ‘Hey, how ya doin’, man? I like your boots.’ I got really uncomfortable and sad, because I’d say 90% of the people there were so engaging. But it’s a gray area where you have love for black folks living next to you for over 200 years, yet a desire to keep white supremacy in place. It’s a wild contradiction.” Indeed, the question that Locke hopes Bluebird poses is, “Is the law a thing that will elevate black life by protecting it from injury, or is the law something black people need protection from?”

With the exception of The Cutting Season, all of Locke’s books have had black male protagonists, something she’s acutely aware of. “When you’re going through life as a black woman and some weird shit goes down, I don’t go to gender first, I go right to race,” she says. “I am black before I’m a woman. Right or wrong, it’s simply how I go through life. And that’s reflected in the books I’ve written. Stripping gender out of the equation lets me tell a story solely about race. It’s a reflection of my psyche.” When asked whether she identifies as a black writer, Locke responds without hesitation: “I identify as a black person first.”

Locke’s husband is white. “I tell our biracial daughter not to judge a book by its cover,” she says. “When I first met her father, I didn’t like him. It wasn’t that he was white; it was his long hair, the cigarettes, the leather jacket, the earring.” She laughs. “And now we’ve been together for 23 years. We’re profoundly honest about race. And we can be irreverent!”

Locke’s been followed in stores, and ignored when speaking to retail employees. In 1997 she was pulled over by the LAPD while driving home from work late one night. “This had never happened to me before,” she says. “Two cops approached me with guns drawn and a flashlight shining into my car. They told me I fit the description of a man who had stolen a car a few streets over. I have short hair, but when the officer on the driver’s side saw my face, he realized I was a woman. No apology from either officer, and they let me go. I live with the burden and privilege of double consciousness around race and gender.”