Terms were not disclosed, but a source told ESPN's Adam Schefter that the six-time Pro Bowler is getting a one-year deal worth up to $10.25 million that includes a $4 million signing bonus.
Carolina was a late entrant to the battle to sign McCoy, bringing him in for a visit last Thursday and Friday after McCoy visited Baltimore and Cleveland.
McCoy left Baltimore thinking he might sign there, sources told Schefter, but Carolina wowed him on his visit and quarterback Cam Newton helped recruit McCoy.
"Carolina was a great fit for me," McCoy texted to ESPN's Josina Anderson. "Being around the guys we just meshed & I love the instant chemistry we had. They have a tradition of having a great defense. I love the players & I believe in #1 [Newton]. Ron Rivera is a proven coach & can't wait to get started."
McCoy, 31, has been a longtime fan of Newton, saying in 2015 that Newton deserved to win the MVP well before the voting was final.
To cap it off, McCoy gets to stay in the NFC South and play against the Bucs, who released him and gave his No. 93 to Ndamukong Suh. Tampa Bay and McCoy "mutually parted ways" on May 20.
"It's great to have Gerald on our side now," general manager Marty Hurney said in a statement. "We are very familiar with his skill set after facing him over the years and know that he not only brings a wealth of talent as a player but is also a tremendous person. We are extremely happy to have Gerald as a part of the Panthers organization."
McCoy's ability to play tackle or end gives Rivera, who took over the defensive playcalling late last season, the position flexibility he is seeking in trying to keep opposing offenses off balance and improve the pass rush.
Carolina finished 27th in the league last season with 35 sacks, the lowest total since Rivera arrived in 2011.
McCoy has 54.5 sacks overall in nine seasons and 45.5 since 2013. Even with a drop-off the past two seasons -- six sacks each year -- McCoy should improve the Panthers' rush. No Carolina interior lineman had more than Short's three sacks last season.
McCoy has been a nemesis to the Panthers since arriving in the NFL as the third overall pick of the 2010 draft. His 42 tackles in 15 games against his NFC South rival is his most against any team. So are his 34 solo tackles.
Pro Bowl guard Trai Turner of the Panthers called McCoy a "real-life savage'' on social media when it was announced the Bucs were releasing their star.
The Panthers had to wait until June 1, when they picked up an additional $7.5 million under the salary cap for the release of offensive tackle Matt Kalil, to compete financially for McCoy. They also cleared another $2 million in cap space by getting wide receiver Torrey Smith to take a pay cut.