It’s difficult for a dog owner to match the love and loyalty extended by a pet.

However, 49ers defensive end Cassius Marsh, the father of Boss, an American bulldog and pit-bull mix, is uniquely devoted.

In 2014, on the day he was drafted in the fourth round by the Seahawks, Marsh boasted to reporters that Boss was the “cutest dog on the planet.” Last year, after he purchased an airline ticket for Boss, Marsh took to social media to express his bewilderment: Per Alaska Airlines policy, Boss couldn’t sit on a seat, but had to lie on the floor … like a common animal.

Marsh, 25, has not been married, but he knows about a for-better-or-worse relationship: Boss, whom Marsh got as an 8-week-old puppy when he was a sophomore at UCLA, has been steadfast during his owner’s tumultuous three-team, four-season NFL career.

“Boss goes with me everywhere,” Marsh said. “I got traded, he was on the plane. I got cut, he was on the plane. That’s my baby.”

The good news for Marsh, who last year was let go by two teams in an 80-day span: He finally might have found an NFL relationship that resembles his love affair with Boss.

The 49ers have shown nothing but love for Marsh since claiming him off waivers in November. First, they gave him a prominent role during the season’s final six games. Next, they signed him to a two-year, $7.7 million contract extension in February. Finally, after they didn’t select a pass rusher in the NFL draft, which was seemingly a pressing need for a team with the NFL’s sixth-fewest sacks last year, head coach Kyle Shanahan cited Marsh’s presence on the roster as a reason.

“You’ve got to be pretty good to beat out Marsh,” Shanahan said.

On his Instagram account, which, naturally, is filled with pictures of Boss, Marsh responded to Shanahan’s quote by saying “it almost brought tears” to his eyes after years of feeling underappreciated.

On Wednesday, Marsh echoed that sentiment, and noted he felt the franchise’s strong embrace even before last season ended. General manager John Lynch told Marsh he was a “big fan” of his game and let him know the 49ers wanted him to return this season.

“I still kind of get a little bit starstruck by John Lynch,” Marsh said. “I used to play video games using him, and he was my favorite safety. So kind of having him show me love and tell me he wanted me here was incredible for me. He’s one of the greatest safeties to play the game, and he’s seen a lot of great defensive linemen.”

To be clear: Marsh, whose career includes two starts and six sacks, has hardly established himself as a great defensive lineman.

However, the 49ers obviously see something. Marsh provided needed speed off the edge in his six-game, off-the-bench role last year: His two sacks tied for third on the team, and he shared team-high honors with two forced fumbles.

Marsh thinks it’s just a preview of coming attractions and says his paltry career numbers have plenty to do with his circumstances. In his first three seasons, Marsh was buried behind several accomplished pass rushers with the Seahawks, who traded him to the Patriots for fifth- and seventh-round picks Sept. 2.

In New England, Marsh, a classic speed rusher, said he was miscast as a “coverage” linebacker. And he became so disenchanted with his role and the Patriots’ culture that he “wanted to get waived” when he requested a meeting with head coach Bill Belichick that precipitated his exit.

“They asked me to do a bunch of stuff that I had never done: covering running backs and receivers and basically almost never rushing the passer, which is what I did in playing defensive line,” Marsh said. “They don’t have fun there. There’s nothing fun about it. There’s nothing happy about it. I didn’t enjoy any of my time there, you know what I’m saying? It made me for the first time in my life think about not playing football because I hated it that much.”

In Seattle, Marsh enjoyed the family-like culture he thinks is being replicated with the 49ers, but he didn’t carve out a significant role. In 2014, a broken foot ended his rookie season after five games. Then, he lost his biggest supporter when defensive coordinator Dan Quinn left to become the Falcons’ head coach and was replaced by Kris Richard.

“I was kind of left with a coach who it was almost like he was almost fighting to keep me off the field,” Marsh said. “I had to really fight and scratch and claw for any opportunities I had. Obviously, we had a very deep defensive line, especially at the defensive-end position. It was just constantly being told that (I was) kind of like a backup type of guy. But I knew and believed in myself: That’s not who I am.”

The Patriots’ decision to surrender two draft picks for Marsh seemed to indicate a promising turn in his career. However, that chapter ended after nine games, 19 tackles and one sack. On Nov. 19, two days before he was waived, Marsh played two defensive snaps in a win over the Raiders in Mexico City.

“I confronted (Belichick) about all the things that were going on,” Marsh said. “I won’t get into detail, but it was B.S. things they were doing. I just wasn’t a fan. And so I, basically, without asking to get cut, I kind of asked to get cut. … I had confidence that I would have an opportunity elsewhere and I would take advantage of it.”

On Wednesday, six months after the 49ers provided that opportunity, Marsh said he hasn’t fully settled into his new life. He still lives in his native Southern California and is staying in a hotel during the 49ers’ offseason program.

Boss is staying with him in Santa Clara, which isn’t surprising given their ’til-death-do-they-part bond. It’s a relationship Marsh wants to be replicated by the first NFL team that has fully embraced him.

“Hopefully,” Marsh said, “I’ll be a Niner forever.”

Eric Branch is a San Francisco Chronicle staff writer. Email: ebranch@sfchronicle.com Twitter: @Eric_Branch