 Marsh was claimed off waivers by the San Francisco 49ers a day after being released by the Patriots.On February 7, 2018, Marsh signed a two-year contract extension with the 49ers.In 2018, Marsh played in 16 games with three starts, recording a career-high 38 combined tackles and 5.5 sacks.