The Bengals announced the contract agreement on Wednesday but didn't disclose terms of the deal.
All of Cincinnati's previous free-agency moves this offseason involved re-signing the Bengals' own players.
The signing comes about a week after Dansby visited Paul Brown Stadium. His addition gives the Bengals a savvy veteran who has experience playing in coverage. Last season, Pro Football Focus gave him an 87.6 cover grade, the fifth-highest mark given to a linebacker.
In a conference call Wednesday, Dansby said "it ain't going to be weird" to play his former team twice next season.
"I felt I could come here and help us get over that hump,'' Dansby said. "I want to be part of something great. These guys are playing great defense. I haven't been around this much talent in a long time.
"I just want to surround myself with a lot of talent one time and see how it will pan out. I think it will pan out great.''
Dansby was released by Cleveland on March 16, shortly after the Browns announced the signing of Demario Davis from the New York Jets. Dansby had signed a four-year, $24 million deal on the first day of free agency in 2014. The Browns saved $3.5 million in cap space by releasing him but will carry a $3 million cap cost for the move.
The 34-year-old Dansby played well for the Browns. He had 93 tackles in 2014 despite missing four games with a knee injury. In 2015, he had a team-leading 108 tackles while adding the responsibility of covering tight ends. He returned two interceptions for touchdowns last season, when he also led the Browns in tackles for loss, interceptions and defensive touchdowns. He was second in passes defended.
"Karlos' numbers speak for themselves, and he is also a great veteran leader," Bengals coach Marvin Lewis said in a statement. "He has the flexibility to play in all situations defensively. Just a very productive, quality guy we are fortunate to add to our team."
The signing comes amid the expectation that the Bengals will bring back former safety Taylor Mays, who spent last season in Oakland. Although primarily a safety when he played for the Bengals from 2011 to 2014, Mays spent part of last season in a nickel linebacker role. He could sign later this week, giving the Bengals two additions to their nickel linebacker coverage.
ESPN Browns reporter Pat McManamon and The Associated Press contributed to this report.