The team also re-signed center A.Q. Shipley to a two-year deal.
Bethea replaces safety Tony Jefferson, who is expected to sign with the Baltimore Ravens.
The 49ers released Bethea on Tuesday after the veteran safety asked for his release.
In his eighth season, Shipley, 30, finally was given the opportunity to start all 16 games in a season for the first time. He rewarded the Cardinals with an overall solid performance, giving up just two sacks, eight hits and 12 hurries on 748 pass-blocking snaps, according to Pro Football Focus.
Bethea, 32, played in all 16 games in two of the three seasons he spent with the Niners. He led the team with 110 total tackles last season and also had one interception.
A three-time Pro Bowler, Bethea has started each of the 162 regular-season games in his 11-year career that began in Indianapolis with the Colts.
ESPN's Josh Weinfuss and Nick Wagoner contributed to this report.