As part of the deal, the Browns also will send their sixth-round pick to the 49ers in exchange for San Francisco's picks in the fifth and seventh rounds.
The trade agreement was reported earlier by CBSSports.com.
McCoy started 21 games for the Browns in three seasons.
The Browns selected McCoy in the third round of the 2010 draft. He played in eight games as a rookie and started 13 in 2011 before his season was ended by a concussion.
McCoy went 6-15 as a starter and threw for 4,388 yards and 21 touchdowns with the Browns.
Information from ESPN NFL Insider Adam Schefter and The Associated Press was used in this report.