Free-agent defensive lineman Michael Johnson, who spent his first five seasons in Cincinnati before signing a lucrative deal last year with Tampa Bay, reached an agreement on a four-year contract Sunday to return to the Bengals.

Johnson's deal is worth $20 million with $6 million due in 2015, a source told ESPN NFL Insider Adam Schefter.

He also is receiving $7 million this season from the Buccaneers as part of the five-year, $43.8 million contract he signed last year. The Buccaneers released him last week after just one season.

The Bengals, who will receive a third-round compensatory pick in the 2015 draft as a result of losing Johnson last year in free agency, now have the defensive end back on the team.

"I'm thankful for the Buccaneers giving me an opportunity to come down there and learn," Johnson said on a conference call with reporters. "I'm going to always cherish all of the memories -- the highs and the lows. You can't appreciate the highs without the lows."

Injuries mostly defined his one season with the Buccaneers.

"This last year was a character-building year. I don't count it as a bad year," Johnson said. "So I come back to Cincinnati with a different mindset and a different outlook on things."

Johnson, 28, also had visited the Minnesota Vikings, whose coach, Mike Zimmer, was the defensive coordinator when he played for the Bengals.

"Our entire organization is just ecstatic about getting Mike back," Bengals coach Marvin Lewis said in a statement. "He's earned tremendous respect from coaches, teammates and management. He did tremendous things for us while he was here, and we look forward to having him blend back in and uplift us as defensive football team."

Johnson was supposed to bolster Tampa Bay's pass rush. But he recorded just four sacks while playing through several injuries.

Michael Johnson struggled in his one season with the Buccaneers, recording four sacks while battling injuries. Kim Klement/USA TODAY Sports

The Buccaneers freed up $2 million in cap space in 2015 by releasing Johnson.

He played with the Bengals from 2009 to 2013 and recorded 26.5 sacks with Cincinnati, including a career-best 11.5 in 2012.

Johnson essentially will be replacing himself after the Bengals struggled to find a good No. 2 defensive end to pair last season with Carlos Dunlap. Backup Wallace Gilberry moved more regularly in the rotation to replace Johnson in 2014, playing more snaps than he previously had in a single season. The added playing time took a toll on Gilberry who went from having 7.5 sacks in 2013 to just 1.5 in 2014.

ESPN.com Bengals reporter Coley Harvey and Buccaneers reporter Pat Yasinskas contributed to this report.