Devon Shepard met Jenji Kohan, the creator of “Orange Is the New Black” and “Weeds,” twenty-four years ago, when they were writers for the NBC sitcom “The Fresh Prince of Bel-Air.” Shepard, a former standup comedian, got into the business serendipitously, after he clowned on a square producer at a black barbershop in Los Angeles. Kohan, who had recently graduated from Columbia, was a rung down from Shepard—a “baby writer,” in Hollywood lingo. But “she was fun, a whole lot of energy, a sponge,” he said. Kohan wanted to learn dominoes—the “loud and outrageous” street version—and they began playing bones in an office they shared, trading stories about growing up black in South Central and Jewish in Beverly Hills. “I made the room cool,” Shepard said. “People were, like, ‘What’s going on in there?’ ”

This was in 1993, a year after the L.A. riots, and at “Fresh Prince,” which starred Will Smith as a Philly street kid sent to live with rich relatives, the writers’ room was a toxic mess. The staff—which included Smith’s bodyguard and his cousin—kept crazy hours and fought non-stop. There were cruel pranks: someone peed in a colleague’s bottle of tequila. Kohan was one of two female writers, and the only white woman. Her nickname was White Devil Jew Bitch. Shepard was one of her few allies.

After “Fresh Prince,” they lost touch. In the mid-nineties, he wrote for “MADtv,” and she wrote for “Tracey Takes On . . . ”—wild, subversive sketch shows. Then, in 2004, Shepard’s agent handed him a script for a cable series about a pot-dealing single mother. One character, a black supplier named Conrad Shepard, echoed elements of Devon Shepard’s life story: Devon had dealt weed, even while working on “Fresh Prince.” He loved the script, which had no writer’s name on it, and told his agent, “I gotta be on this show.” The agent asked him if he knew the creator: Jenji Kohan. Shepard said, “Do I fucking know her? If your white ass don’t put me in the room, I’m gonna choke the shit out of you.”

Shepard wrote for “Weeds” for three years. Kohan was a dream boss, he said, because she was just as curious, energetic, and easily bored as she had been on “Fresh Prince.” “Jenji has A.D.D.,” he said. “It was like having a class clown as your boss.” The writers played hours of online poker, and to open things up Kohan issued weird challenges: “She would say, ‘I want you to end each scene with a curse word and then start with a curse word.’ Or ‘Have someone hold a cup, and then have a cup go through the whole episode.’ ” Shepard was used to being pigeonholed; at job interviews, he was told, “If we add a black character, we’ll call you.” Although, to his frustration, many people thought that he was responsible for the black dialogue on “Weeds,” he actually wrote more scenes for the white main character, who was played by Mary-Louise Parker. Kohan wrote for all the characters, including Conrad and Heylia, another African-American supplier. In Shepard’s view, empathy and talent outweighed identity. Outsiders could sometimes take bigger risks, because they were less constrained by the burdens of representation. “The person inside the party is always going to have a different perspective than a person looking in the window,” he said.

To break up the monotony, he and Kohan playacted an imaginary TV show called “Djembe,” about an African man who was married to a white suburban woman. The gag eventually made it into an episode. The premise was that Djembe couldn’t speak, and communicated by banging on a drum. “You would have thought we were all fucking crazy and racist,” Shepard said, cracking up at the memory. “We were just so free.”

Shepard, who is now an executive producer of “Legends of Chamberlain Heights,” on Comedy Central, was thrilled to witness Kohan’s breakout. He knew that she’d “gone through hell” for years after “Fresh Prince.” Shepard told me, “Here was Jenji’s problem. And I mean this in a good way. She’s a weirdo, and a nerd, and all these things. You can’t just put that kind of person in any fucking room. She had to be a showrunner! She had to be in charge. Anything else would put that fire out.”

Kohan has a story that she likes to tell about Shepard. “I remember Devon coming into the writers’ room,” she said. “He yelled, ‘I can write a motherfucking “Frasier”! But they will never let me.’ That sticks with me so vividly.”

We were in the back yard of the house that “Weeds” built, having drinks by a fire pit. Kohan and her husband, Christopher Noxon, bought the airy, sprawling estate, in the Los Feliz neighborhood of Los Angeles, during the show’s fourth season, four years before she created “Orange Is the New Black” for Netflix, establishing herself as a rarity: a two-hit auteur. “Weeds” was Kohan’s payoff after a dozen years of frustration, but it began as one of many scattershot pitches—desperate attempts to jump from network to cable, to “trade money for freedom,” as she saw it. Her pitch was only four words: “suburban widowed pot-dealing mom.” But the series lasted eight seasons, garnering twenty Emmy nominations and two wins.

As “Weeds” was ending, “Orange Is the New Black,” an adaptation of a memoir by a Smith-educated Wasp who went to prison, became Kohan’s off-ramp. The two shows share a sensibility. As Kohan put it, “I’m fascinated by people interacting with the Other—forced to interact with people they’d never have to deal with in their day-to-day lives.” Her specialty is exploring “crossroads,” which are often found in underground economies. “Attraction or repulsion, it’s great for drama,” she said. “It’s something that interests me in my life. I want to meet all sorts of people, not to live in my bubble. And, right now, the world is just ‘Everyone back to their corners.’ ” In the Trump era, Kohan sees an urge to hunker down with one’s own, “to just put your loudspeaker up and say, ‘This is me, and this is my world view, and I don’t want to know from yours.’ ”

Kohan and Noxon, a freelance writer who is also what the couple calls the “domestic first responder,” bought the house from a family who’d been wiped out by Bernie Madoff’s Ponzi scheme. The place spills over with Kohan’s finds from thrift shops—she described her scavenging habit, which she developed in her teens, as “a treasure hunt, urban archeology.” She owns Berrie figurines, trivets, vintage spectacles, polyurethane grapes (“my vineyard”). The house, with its screening room and its back-yard “art barn,” has something in common with Kohan’s shows, emphasizing zestful world-creation over beige tidiness. It’s also the warm family space that she longed for. Marriage wasn’t a goal, but she always knew that she wanted kids. On the kitchen wall, there were Post-its with scrawled quotes from the kids: “Sukkot Bien!”; “Don’t get sucked into Bubbie’s nonsense.” Her son Oscar, who is twelve, lay sprawled on a sofa, watching “The Office.” His seventeen-year-old brother, Charlie, was heading to Columbia in the fall; his fifteen-year-old sister, Eliza, was in Manhattan with Noxon for the summer, doing an internship at a theatre. Kohan would join them soon, and begin shooting Season 6 of “Orange,” in Queens.