The deal is for one year, a league source told ESPN NFL Insider Adam Schefter.
Marshall was released Wednesday by the Miami Dolphins.
Marshall, 28, started four games for Miami last year but spent the final two months of the season on injured reserve with a back injury. The eighth-year pro, who has also played for Carolina and Arizona, had been scheduled to make $1.2 million this season.
He would likely be the nickel cornerback for San Diego and can compete with Shareece Wright for a starting spot. The Chargers lost their two starting cornerbacks, Antoine Cason and Quentin Jammer, in free agency.
Information from ESPN.com's Bill Williamson and The Associated Press was used in this report.