Hill, 25, established himself as the team's best safety last season with his hard hits and ability to cover tight ends. A restricted free agent this season, Hill would have been an unrestricted free agent after the season.
"It means a lot to me," Hill said. "I wanted to be a Raven. This extension gives me a lot of confidence on the playing field. It helps me see what the organization thinks of me."
The deal shows a level of trust in a safety with several off-the-field problems in his past.
Hill has been suspended three times by the NFL in the first three years of his career. The Ravens signed him last offseason when the New York Giants released him after he received a six-game suspension for violating the league's substance abuse policy.
After returning from his suspension last season, Hill graded out as the 14th-best safety by Pro Football Focus in his first season in Baltimore. He made 41 tackles on the season and returned an interception 44 yards for a touchdown against the New Orleans Saints.
The Ravens solidified their safety position this year after reaching an extension with Hill and signing Kendrick Lewis to a three-year, $5.4 million deal in free agency.
The deal with Hill was finalized by the end of Thursday's practice, and general manager Ozzie Newsome approached Hill to tell him that the organization thinks highly of him.
"It's a weight off my shoulders," Hill said. "Now it's time to take it to the next level and try to win a championship."