Moore was beaten out for Miami's No. 1 job last summer by rookie Ryan Tannehill and played in only two games off the bench. The five-year veteran started 12 games for the Dolphins in 2011 and had his best season, throwing for 2,497 yards and 16 touchdowns with nine interceptions.
"Whether you're a starter or a backup in this league, it needs to be the best fit and the right team," Moore said. "To me, there's no other team out there that's perfect. I think myself and the Miami Dolphins fit perfectly together."
Moore said remaining with the Dolphins appealed to him partly because he expects substantial improvement by a team that has endured four consecutive losing seasons.
"This team is definitely going places," he said. "There are big things to come, and I didn't want to miss out."
Financial terms of the deal weren't disclosed when it was announced Friday. Miami also signed receiver Brian Hartline to a five-year deal Friday for nearly $31 million.
"I am excited that we have been able to reach an agreement with both Brian and Matt to keep them as members of the Miami Dolphins," Dolphins GM Jeff Ireland said in a statement.
"Brian is an ascending player that has steadily improved over his first four years with the organization. He has represented himself positively both on the field and throughout the South Florida community. Matt has been a valuable contributor to the Dolphins ever since he arrived two seasons ago."
Information from The Associated Press was used in this report.