Comey, 52, a former deputy attorney general under former president George W. Bush, is best known for facing off against White House officials over the legality of a National Security Agency (NSA) eavesdropping program.
"He was prepared to give up a job he loved rather than be part of something he felt was fundamentally wrong," Obama said, referring to Comey's threatened resignation over the row, as he nominated him at the White House.
Comey, a former prosecutor, has the tough assignment of succeeding Mueller at the head of the Federal Bureau of Investigation.
Obama asked Mueller to serve an extra two years after a regulation 10-year term at the agency, after building high confidence in his abilities.
"You will be remembered as one of the finest directors in the history of the FBI and one of the most admired public servants of our time," Obama told Mueller in the event in the White House Rose Garden.
Mueller's entire term at the FBI has been dominated by terrorism. He took over at the agency the week before the September 11 attacks transformed American security and foreign policy.
