Before he made it big, Jay Leno slept in his car and squatted in empty LA homes

Jay Leno used to sleep in his car and squat in empty LA homes in the early...

As a comedian and former host of NBC's "The Tonight Show," Jay Leno has enjoyed a successful and lucrative career. At the height of his time on "The Tonight Show," Leno reportedly earned as much as $30 million a year.

But he wasn't always bringing in steady paychecks.

When Leno moved to Los Angeles in the early 1970s, the first thing he bought was a 1955 Buick Roadmaster, which he still owns today and has featured on his CNBC show "Jay Leno's Garage." The car only cost him $350.

"In L.A., you actually need a car before you need a place to live because you can't get to the place you live if you don't have a car, because there's really no public transportation," he tells CNBC Make It.

However, Leno still couldn't afford an apartment, so he slept in his Roadmaster. And in between nights in the car, he squatted in empty houses.

"I would drive around to open houses. I'd go there on a Sunday — you know, 'open from 12 to 4' — then around 3:30, I'd look around the house, and then I'd slam the door and duck in the closet," he says. "When the realtor locked up, I would live in the house for a couple of days."

When the realtor showed up again, he'd apologize and move on to the next house, he says.

He was also careful to keep the homes he stayed in tidy. "I never stole anything. I always took care of the house and made the bed and everything."

Leno says the stunt is one of the craziest things he did to get by as a young comic. "It was fantastic," he adds.

Why Jay Leno never touched his 'Tonight Show' money

Leno isn't the only successful person who went to extremes to save money before making it big. In his 20s, billionaire Mark Cuban aimed to live on as little as possible. "I did things like having five roommates and living off of macaroni and cheese, " he told Money in 2017.

Like Leno, he also drove super cheap cars, including a 1966 Buick LeSabre and a Fiat X1/9 with a hole in the floorboard. "I didn't have a car that cost more than $200 until I was 25, I think," he said. "It was crazy."

Although Leno no longer crashes open houses, his frugal habits stuck with him throughout his career. Once he started bringing in money, he'd work two jobs and live off the smaller income while saving the larger one.

"When I was younger, I would always save the money I made working at the car dealership, and I would spend the money I made as a comedian," he previously told CNBC Make It. "When I started to get a bit famous, the money I was making as a comedian was way more than the money I was making at the car dealership, so I would bank that and spend the car dealership money."

His approach to money has always been simple but effective: "I never lived beyond my means, and I always tried to only buy things I could actually afford."

CNBC's " Jay Leno's Garage " airs Wednesdays at 10 p.m. ET.

Like this story? Subscribe to CNBC Make It on YouTube!

Don't miss: Here's the salary you need to earn to save 10% of your income and retire with $1 million

Jay Leno has no debt thanks in large part to abiding by this one rule