A former first-round pick, Myers has won at least 11 games each of the past four seasons. The deal is contingent upon Myers passing a physical.
Myers, who made $3.3 million last season, will earn $5 million this year, $8.5 million in 2008 and $12 million in 2009. He gets a signing bonus of $250,000.
"We're very pleased to have gotten this deal done with Brett, who is arguably one of the premier pitchers in the National League," assistant general manager Ruben Amaro Jr. said. "He's a proven top-of-the-rotation starter and he will certainly play an even bigger role for us going forward."
The 26-year-old Myers went 12-7 with a 3.91 ERA in 31 starts last season. He led the Phillies in wins, ERA, starts, innings (198), strikeouts (189), winning percentage (.632) and opponents' batting average (.257).
Myers won 14 games in his first full season in 2003 and has started at least 31 games every season since. He is part of a deep rotation that includes newcomers Freddy Garcia and Adam Eaton, promising left-hander Cole Hamels and veteran Jamie Moyer. The Phillies also have Jon Lieber, who could be on the trading block.
Myers missed time last season after taking a leave from the team following his arrest for abuse against his wife in Boston in late June. The charge against Myers was dismissed in October when his wife said she did not want her husband prosecuted for hitting her in the face during an argument near Fenway Park.
"I've grown up in this organization and this is where I want to stay," Myers said. "I love pitching in Philadelphia. I love the ballpark. I love the fans and having Charlie [Manuel] as the manager and guys like Chase Utley around for the next few years was a big part of my decision.
"I've played with these guys -- Ryan Howard, Jimmy Rollins, Pat Burrell -- for the last few years and I couldn't imagine myself playing for another organization or with another group of guys. It would probably be a culture shock," he said.
The Phillies gave Utley, an All-Star second baseman, an $85 million, seven-year deal last month. Reliever Geoff Geary is the only remaining player eligible for arbitration.
Selected with the 12th overall pick in the 1999 amateur draft, Myers is 54-40 with a 4.34 ERA in 140 starts and one relief appearance.