To help him prepare for his role as an overlooked Asian American everyman in “Interior Chinatown,” Jimmy O. Yang bought a $1,500 used Toyota Corolla and drove it around Los Angeles.

It was, to put it mildly, a lemon: The driver’s side door didn’t work. There were no power windows. The brakes were so shot that he once struggled to stop in time and bumped into a Tesla whose owner was irate — until he recognized Yang and asked to get cast in one of his shows.

But the most telling encounter, said Yang in a recent interview, was when he pulled up to the studio gate and the guard refused to let him on the lot.

“I’m No. 1 on the call sheet, and she would not give me the time of day. She was like, ‘Pull over, call whoever got you in here. If you can’t, you gotta go’ — she was so rude to me because I was in this car,” recalled the actor-writer- comedian.

The experience gave Yang a sense of how people tend to dismiss Asian Americans, especially those who exist on the economic margins. “It’s sad, and it informed a lot of my decisions on the show,” he said.

In the surreal “Interior Chinatown,” which Yang aptly describes as “ ‘The Twilight Zone’ meets ‘Law & Order,’ ” Yang stars as Willis Wu, a waiter at a seedy Chinese restaurant that doubles as the perpetual filming location for a police procedural called “Black & White.” Willis laments feeling like “a background actor in someone else’s story” and longs to be in the spotlight, “but that’s hard if you look like me,” he says. Then he witnesses a crime, and suddenly finds himself thrust into the center of the story. Premiering Nov. 19 on Hulu, the 10-episode series was created by Charles Yu and adapted from his National Book Award- winning novel of the same name, a moving, inventive send-up of Asian stereotypes in pop culture.

Willis’ journey “is such a metaphor for the Asian American experience,” Yang said, “because we are the model minority, but at the same time we are invisible. People talk about Black and white, but where do we fall? You’re just not seen for who you are.”

“Interior Chinatown” represents a breakthrough dramatic role for Yang, who is perhaps best known for his scene-stealing turn as Jian-Yang, a quietly menacing Chinese app developer in the HBO comedy “Silicon Valley,” and for stand-up specials like Amazon Prime Video’s “Good Deal” and “Guess How Much?”

It is also a deeply personal project with striking parallels to his own life story, as an immigrant who moved to the United States from Hong Kong as a teenager and spent years toiling away in bit parts — “Chinese Teenager #1,” “Person in Line” — until he attained leading-man status.

“Emotionally, I always connected with Willis,” Yang said. “At the same time, I think it’s a universal story. I’ve never felt like I fit in, not just because I’m Asian — that’s part of it — but also because I grew up in a pretty traditional family that wanted me to get a real job, and I wanted to be an artist.”

As Yang was preparing to graduate from the University of California San Diego, and panicking about his future, he tried doing stand-up at an open-mic night at the Haha Club in North Hollywood. It was a “holy (crap) moment,” he recalled. “My material sucked but I was more comfortable onstage than off.” He was instantly hooked and started going as much as possible.

Stand-up became his informal writing, acting and directing school. “You just learn so much. There’s no more honest feedback than laughter from a real audience — or lack thereof.”

Yang started doing background work and eventually landed small speaking roles. There were many moments when, like Willis in “Interior Chinatown,” he was reminded of his place in the Hollywood pecking order. On the set of the ABC series “Agents of S.H.I.E.L.D.,” when he had a few lines of dialogue as the aforementioned “Chinese Teenager #1” in an episode set in Chinatown, he went to get a soda from craft services and was stopped by a crew member. “She was like, ‘Oh, I thought you were one of the background actors,’ because I was Chinese,” he said.

Yang eventually was cast in “Silicon Valley” in what was originally written as a one-off guest role but became a series regular. From the beginning, he elevated what, in less capable hands, could have played as a one-note cliche.

“Jimmy quickly showed himself to be a really great comedy actor. He understood the joke but played it very real and never seemed like he was reaching for the comedy or trying to be funny,” “Silicon Valley” creator Mike Judge said in an email.

Yang, who speaks three Chinese dialects — Cantonese, Shanghainese and Mandarin — decided that Jian-Yang was probably from mainland China and likely would speak with a Mandarin accent. “If you’re going to do an accent, you’ve got to do it specifically,” he said.

“I remember watching it as a fan and just being like, ‘Who is this?’ ” said Yu, who, in addition to being a novelist, is a TV writer with credits on “Westworld” and “Legion.” “There was a lot of discussion, maybe even controversy, about the character and whether it played into stereotypes. But what got me about that was he sounded like people that I’ve heard.”

“Silicon Valley” also became a training ground for Yang, who starred opposite seasoned improvisers like Zach Woods and Thomas Middleditch. “I learned that if I don’t listen and pay attention, and I’m just thinking about my next line, I am going to be lost. It was a great lesson,” he said.

Other opportunities soon followed. In 2018, Yang published a memoir, “How to American: An Immigrant’s Guide to Disappointing Your Parents.” The same year, he played the extravagant Bernard Tai in “Crazy Rich Asians,” a film that marked a watershed for Asian representation in Hollywood.

“I always had this ignorant optimism about me,” Yang said of the industry’s track record when it comes to the AAPI community. “If I botched an audition, I never blamed the fact that they weren’t looking for an Asian actor. It didn’t deter me. But looking back, we had very limited opportunities. Since ‘Crazy Rich Asians,’ I think there’s more.”

Success has meant that Yang has made his father, Richard Ouyang, proud — and even helped him score some acting gigs, including a recent car commercial starring both of them. “They always say ‘nepo baby.’ I like to think he’s the nepo daddy in this family.”

When Yang got the call to audition for “Interior Chinatown,” he felt an immediate connection to the role. “I was like, ‘I gotta get this. This means so much to me,’ ” he said.

Yu said both the novel and series were inspired by “people who have these backstories, but they don’t get to tell those stories.” When it came to casting Willis, Yang was an intriguing choice because he’d followed such a similar journey. “There honestly aren’t many people out there that have had that kind of career path, to start as a featured extra and grow into a phenomenon on ‘Silicon Valley’ where people were quoting his character’s lines,” Yu said.

Yu recalled being “knocked back” by the emotional weight — and the tears — that Yang delivered in his audition. “I was — I don’t want to say surprised, because it sounds like I wasn’t expecting him to do well — but it’s not something you expect from this guy who just made you laugh for years,” said Yu, who sees a connection between Yang’s multilingual, multicultural background and his natural facility for acting.

For Yang, finally being No. 1 on the call sheet was a challenge — albeit a welcome one.

“It was six months of shooting. I was basically in every scene. I had to be funny on Tuesday, do kung fu on Wednesday and cry on Friday. It was very grueling,” Yang said. “But of course, it’s a beautiful story worth telling.”