"The Big Bang Theory" ended when Jim Parsons decided to leave the show. However, the actor has a good reason for doing so.

The long-running American sitcom "The Big Bang Theory" became part of people's lives when it premiered in 2007. Parsons, who played the role of Sheldon Cooper in the 12-season series, exited the show and penned an emotional message about its ending.

While it seems like there was nothing wrong before he left the show, Parsons disclosed the heartbreaking reason that actually led to his departure.

In the recent episode of "David Tennant Does a Podcast With...," the 47-year-old actor said that work pressure and personal problems caused him to leave "The Big Bang Theory."

"It was a complicated road, as you could imagine," Parsons said. He also confessed that he knew he was going to leave from the moment he signed to continue playing Sheldon's role in Seasons 11 and 12.

His plan started to solidify in the summer of 2018 when he was chosen for "The Boys In The Band" on Broadway. Despite the good news, he was slapped with a bad development after learning that one of his dogs became gravely ill just before his scheduled filming for an Intel commercial.

"He just looked so bad and I was so tired and I just started crying," Parsons recalled during the podcast. "I was like, 'This dog's going to die while I'm off working and I feel so bad.' "

After being torn between two important things, Parsons decided to shoot the commercial first. Unfortunately, the following night, the dog suffered from a bad seizure.

Meanwhile, he and his husband, Todd Spiewak, made the difficult decision to end their pet's pain. Parsons recollected how that time became the scariest moment of his life -- as if he was at the edge of a cliff.

During that summer, the series of unfortunate events continued when Parsons broke his foot soon after he walked out for a curtain call for the last show.

"I had this moment of clarity that I think you're very fortunate to get in a lot of ways, of going, 'Don't keep speeding by.' You know? 'Use this time to take a look around.' And I did," he uttered. "I was like, 'I gotta make a move.'"

When the shooting schedule for Season 12 of The Big Bang Theory approached, he realized he would be 46 years old before the end of filming -- which is a six-year difference when his father died at the age of 52.

Sheldon Said Goodbye to "The Big Bang Theory" Family

Parsons, after returning to Los Angeles, immediately talked to Big Bang writers Chuck Lorre and Steven Molaro that he needed to try other things (though he had no idea what they would be).

"It was clarity thrust upon you, as Shakespeare might have said. I didn't know that I was searching for it but between the dog and the foot, I was just like ... 'Okay. Let's take charge here,'" he continued.

He marked the end of the series through a post on Instagram in May 2018. Parsons shared a group photo of "The Big Bang Theory" cast, including Johnny Galecki, Kaley Cuoco, Simon Helberg, Kunal Nayyar, Mayim Bialik and Melissa Rauch.

Currently, Parsons is back to work, as he is co-producing the new Fox comedy titled "Call Me Kat."

READ MORE: Goodbye, Pirates! Johnny Depp Lands BRUTAL Role in 'Waiting for the Barbarians'