The free-agent pitcher reached a preliminary agreement on a $100 million, five-year contract with the Phillies on Monday, a person familiar with the deal told The Associated Press.
The agreement is subject to the 32-year-old left-hander passing a physical, the person said on condition of anonymity because the agreement was not final.
The Yankees and Texas Rangers had been considered the front-runners, but the Phillies wound up with the most-prized free agent of the offseason, reaching a deal that gives them a dominant rotation that likely is the strongest in the majors.
Lee, the 2008 AL Cy Young Award winner, joins reigning NL Cy Young winner Roy Halladay, Roy Oswalt and Cole Hamels in a fearsome foursome.
After Lee helped the defending champion Phillies reach the 2009 World Series, he was sent to Seattle in a four-team, nine-player trade last Dec. 16 that brought Halladay to Philadelphia. Halladay signed a new contract that added $60 million over three seasons, the same average salary Lee will get.
Seattle traded Lee to Texas in July, and Lee pitched the Rangers into the World Series for the first time.
The Phillies have been considering trading pitcher Joe Blanton and/or outfielder Raul Ibanez to clear payroll space, a person familiar with Philadelphia's deliberations. said. That person spoke on condition of anonymity because those talks were ongoing.
Lee and his family had a good time during his stay with the Phillies, who acquired him from Cleveland in July 2009.
"At first, I didn't believe it. I thought we were working out an extension with the Phillies," Lee said the day after the trade. "I thought I'd be spending the rest of my career there. ... I was under the impression they wanted to keep me there for a long time. In my mind, it was going to happen."
After advancing to the World Series in consecutive years, the Phillies were upset by the eventual champion San Francisco Giants in this year's NL championship series. Earlier this month, outfielder Jayson Werth left Philadelphia for a $126 million, seven-year contract with the Washington Nationals.
The Yankees and Cleveland received telephone calls Monday telling them they were out of the running, two separate people familiar with those team's negotiations said, also on condition of anonymity.
New York had started with a $138 million, six-year offer to Lee, the person familiar with the Yankees' negotiations said. After outfielder Carl Crawford agreed to a seven-year, $142 million deal with the Boston Red Sox, New York immediately increased its offer to Lee to $150 million over seven seasons, the person said.
With Lee's departure, the Rangers could move closer Neftali Feliz from the bullpen to the rotation and may attempt to acquire 2009 AL Cy Young Award winner Zack Greinke in a trade from the Kansas City Royals.
This was a rare instance in which the Yankees' financial might failed to land a player they wanted. After losing to Texas in the AL championship series, they are seeking to add pitching to a rotation that includes C.C. Sabathia, Phil Hughes and A.J. Burnett. New York is waiting to find out from Andy Pettitte whether he will pitch or retire; the Yankees also have promising Ivan Nova, a hard-throwing right-hander who turns 24 next month.