The deal includes a club/vesting option for the 2016 season. Casilla passed his physical to finalize his new contract, Giants vice president of baseball operations Bobby Evans said.
The 32-year-old Casilla went 7-6 with a 2.84 ERA and 25 saves last season, initially assuming the closer role after 2010 saves leader Brian Wilson was lost in April to a second Tommy John reconstructive elbow surgery. He made 73 appearances and pitched 63 1/3 innings.
"Glad to know we have Santiago for at least three more years," manager Bruce Bochy said. "He's been an integral part of our bullpen the last three years, so it's great to have him tied up for the next three years."
Casilla is set to earn $4.5 million in 2013 and '14 and $5 million in 2015. He would receive a $1 million buyout if his option doesn't vest. He was eligible for arbitration this winter and could have become a free agent next offseason.
Giants general manager Brian Sabean was committed to keeping his championship team intact as much as possible - and, so far, he has been able to do so with much of the core group.
Left-hander Jeremy Affeldt signed an $18 million, three-year deal in November, then center fielder Angel Pagan and second baseman Marco Scutaro reached multiyear contracts during this month's winter meetings in Nashville -- Pagan for $40 million over four years and Scutaro for $20 million over three years.
In addition, San Francisco brought back Andres Torres on a one-year deal last week to play left field. He was a key member of the 2010 World Series winners here.
The Giants declined to tender Wilson a contract late last month, making him a free agent. Bochy has said Sergio Romo will be his closer heading into 2013.
Romo is thrilled to see so many familiar faces returning.
"I thought it was real huge we signed those guys back," Romo said. "What a role they played in our ride last year, our adventure as a group last year. Having [Pagan and Scutaro] back, those are the top two guys in our lineup. We've got the top of our order back."
Casilla's new deal was negotiated by agents Sam and Seth Levinson, who also represent 2012 All-Star Game MVP Melky Cabrera. The former Giants outfielder was suspended for 50 games in August for a positive testosterone test and left off San Francisco's postseason roster once eligible to return.
Cabrera received a $16 million, two-year contract from the Toronto Blue Jays last month.