The Marlins and outfielder Corey Dickerson have agreed to a two-year, $17.5 million contract, sources confirmed to ESPN.