The contract also contains a vesting option for a fourth year worth $11 million, the source said.
With completion of the deal, Rollins will stay with the organization that has been his baseball home since 1996, when the Phillies selected him in the second round of the amateur draft.
Rollins seemed to confirm the deal on Twitter, writing, "I see you all know by now. Gotta deal with me for 3 (4) more years!" Rollins, 33, is a three-time All-Star, three-time Gold Glove winner and won the National League MVP award in 2007. He is fourth on the Phillies' career list behind Richie Ashburn, Mike Schmidt and Ed Delahanty with 1,866 hits, and ranks among the franchise's top five in games played, plate appearances, runs, total bases, doubles, triples and stolen bases.
Rollins joins Jose Reyes (Miami), Alex Gonzalez (Milwaukee), Rafael Furcal (St. Louis) and Clint Barmes (Pittsburgh) as the fifth starting shortstop to sign a multi-year deal as a free agent this winter.
Although Rollins had expressed interest in signing a five-year deal upon entering the free-agent market, the contract could still keep him with the Phillies through the 2015 season, when he will be nearly 37.
Rollins will be reunited in Philadelphia this season with fellow Oakland, Calif., native and close friend Dontrelle Willis, who signed a one-year deal with the club Thursday.