The Ravens didn't disclose terms, but a source told ESPN that the contract is worth $26 million and Weddle can earn up to $29 million with the contract if he meets incentives. He will be paid $9 million in 2016 and $13 million total in the first two seasons.
Weddle will be in Baltimore on Wednesday to take a physical and meet with reporters, the team said.
Weddle is the consistent producer at safety whom the Ravens have coveted since the team lost Ed Reed in 2012. His presence should help turn around a secondary that allowed a franchise-worst 30 touchdown passes last season.
Safety has been a major position of need for the Ravens, who have struggled to address it in free agency and the draft. Weddle represents a major upgrade over Baltimore's current top safeties, Lardarius Webb, Will Hill and Kendrick Lewis.
The Ravens will likely part ways with Hill or Lewis. Baltimore can save $2.84 million by releasing Hill and $933,332 by cutting Lewis.
The Ravens were expected to make a signing after freeing up $10 million in cap space last week by restructuring the contracts of guard Marshal Yanda and cornerback Jimmy Smith and reducing the pay of cornerback Kyle Arrington.
Weddle is the second free agent who played with another team last year whom Baltimore has signed this offseason. The Ravens signed tight end Benjamin Watson to a two-year, $8 million deal last week. Watson had spent the past three seasons with the New Orleans Saints.
The 31-year-old Weddle was the only safety in the NFL named first or second-team All-Pro for five straight seasons, from 2010 to 2014.
In 2015, for the first time since 2010, he did not play a full 16-game season -- he finished the season on injured reserve with a groin injury. He was placed on IR against his wishes after the team fined him $10,000 for violating team policy by not going into the locker room at halftime during the team's 30-14 win over the Miami Dolphins two weeks earlier, choosing instead to watch his daughter perform in a halftime show with the team's cheerleaders.
Weddle skipped voluntary workouts last offseason to show his displeasure with the Chargers' unwillingness to sign him to a contract extension. He said he felt disrespected by the way the organization handled negotiations.
He finished without an interception last season for the first time in his nine-year career. He played in 723 defensive snaps in 2015.
Since 2008, Weddle has played an average of 953 snaps in the regular season.
For his career, Weddle has 850 combined tackles, 19 interceptions, 71 pass breakups and 6.5 sacks in nine seasons.
ESPN's Adam Schefter, Adam Caplan, Jamison Hensley and Eric D. Williams contributed to this report.