"I will be forever indebted to this city," Mason said Monday at a press conference at team headquarters. "The decision to retire was hard. The decision where to retire was easy."
The Ravens discussed bringing Mason back after releasing him, but they were unable to come to an agreement and he signed with the Jets.
"The piece of my body that I play with the most was still here in Baltimore: my heart," Mason said. "I would like to thank the organization for allowing me to retire here. It's an amazing place."
Mason is the Ravens' all-time franchise leader with 471 receptions, 5,777 yards and catches in a single season with 103 receptions in 2007.
"Thank you for retiring as a Raven," Baltimore coach John Harbaugh said to Mason.
Mason played in the NFL for 15 seasons, finishing his career with 943 receptions for 12,061 yards and 66 touchdowns.
Mason set an NFL record for all-purpose yards in a single season with 2,659 yards that was broken by Darren Sproles last year.
Mason announced his retirement on Jan. 9 after being cut by the Texans on Dec. 12.
He was traded to the Texans from the Jets for a conditional seventh-round draft pick last October.
He caught 19 passes for 170 yards last season.
"I was a very happy man when we signed Derrick Mason," Ravens general manager Ozzie Newsome said. "He was one of the top free agents we ever signed."
For more coverage of the NFL, go to profootball.scout.com.
Follow me on Twitter: @RavensInsider
Want more in-depth coverage on your favorite NFL team? Click here and get started today.