The Ravens originally signed Hurst as a rookie free agent out of North Carolina in 2014. He has never missed a game as a pro, seeing action in 64 consecutive contests, including 32 starts.
"This is good news for our football team," head coach John Harbaugh said in a statement. "James is a reliable, tough and versatile player who has played a lot of football for us. He has started at both tackle and guard, and all he has been is productive and someone who has made us better."
Hurst's four-year deal is worth $17.5 million, with $8 million guaranteed, according to the NFL Network's Ian Rapoport, citing a source.
Hurst started all 16 games last season, making 15 at left guard and one at left tackle. He helped the Ravens allow the league's seventh-fewest sacks (27, tied Vikings) and produce the NFL's ninth-ranked scoring attack (24.7 ppg).
Hurst (6-5, 317) has started 15 career games at left guard, 14 at left tackle, two as a tight end in "jumbo formations" and one at right tackle.
Also Monday, the Ravens released veteran safety Lardarius Webb, who has spent all nine of his NFL season with Baltimore.