The Senate voted unanimously to confirm the 58-year-old Petraeus, the current Commander of the United States Central Command, in his new role.
Petraeus, a four-star general, served as the Commanding General of Multi-National forces in Iraq from 2007 to 2008 and was widely credited for turning around U.S. fortunes there.
“General Petraeus is quite simply one of the finest military leaders our country has ever produced,” Sen. John McCain (R-Ariz.) said prior to the vote.
In nominating Petraeus to the post last Wednesday, President Barack Obama said the general was "an extraordinary example of service and patriotism."
In an appearance before the Senate Armed Services committee Tuesday, Petraeus said that he was "humbled and honored" to be nominated to succeed McChrystal.
At the hearing, he outlined how he would lead U.S. interests in Afghanistan ahead of the Obama administration's planned withdrawal in July 2011.
"It is important to note the President's reminder in recent days that July 2011 will mark the beginning of a process, not the date when the U.S. heads for the exits and turns out the lights," Petraeus warned about the timetable for withdrawal.
Petraeus assumes his new role after Gen. McChrystal was removed from command by President Barack Obama in the wake of a profile published in Rolling Stone magazine that featured strong criticism of the administration's civilian leadership of the conflict.