The recovery timetable likely takes Garrard out of the competition to win the starting job for the season opener in four weeks.
"Everything went great this morning," Garrard tweeted. "Be back before u know it!! Phins Up!!!"
Garrard's knee had been bothering him for a few days, and following an examination he decided to undergo surgery rather than deal with the issue throughout the season, said his agent, Al Irby.
"He had been feeling some soreness, and he got it looked at," Irby said. "He could have played on it, but they'd rather do the surgery now to make him more comfortable, rather than fool around with it."
The decision came with Garrard slated to start in his Dolphins debut Friday night against the Tampa Bay Buccaneers in their exhibition opener. The Dolphins lost, 20-7.
Moore replaced Garrard as the starter against the Bucs, completing 7 of 12 passes for 79 yards to go with an interception. Tannehill completed 14 of 21 passes for 167 yards and a touchdown.
Garrard, 34, started for Jacksonville from 2005-10. He underwent back surgery in October and sat out last season, then signed with Miami in March.
He hasn't had issues with his knee in the past, Irby said.
Garrard's best season was in 2007, when he threw 18 touchdown passes and only three interceptions. He topped 3,500 yards passing in 2008 and '09, and he's 39-37 as a starter in nine seasons, all with Jacksonville.
Information from The Associated Press was used in this report.