The deal is worth $39 million and includes a $5 million signing bonus, according to NFL Network.
Sherman, released Friday by the NFC West rival Seattle Seahawks, began his first day as a free agent with a visit to the 49ers. Entering the visit, the two sides reportedly were expected to work quickly on a deal if Sherman's surgically repaired Achilles passed inspection.
Sherman, a three-time All-Pro cornerback with the Seahawks, turns 30 on March 30.
In addition to the 49ers, Sherman said the Tennessee Titans, Detroit Lions, Oakland Raiders, Houston Texans, Tampa Bay Buccaneers and Green Bay Packers were interested in meeting with him. He acted as his own agent during his brief time on the market.
Seattle plays the 49ers twice every season in the NFC West. The Seahawks saved $11 million against the 2018 salary cap by releasing Sherman. Seattle also traded defensive end Michael Bennett to the Philadelphia Eagles -- the deal isn't official until March 14, when the new league year begins -- and are reportedly all ears if teams want to blow them away with a trade offer for safety Earl Thomas.
San Francisco started the offseason by agreeing on a $137.5 million pact with impending free agent Jimmy Garoppolo. The move, coupled with a six-game winning streak to end the season, has sparked significant interest from free agents, general manager John Lynch said at the NFL Scouting Combine.
Sherman ended last season on injured reserve because of a ruptured right Achilles tendon. He had surgery on his left Achilles tendon to remove bone spurs in January. Sherman expects to be ready for the regular season but could be limited in August for training camp and parts of the preseason.
The Stanford product is from Compton, Calif.
--Field Level Media