Earnest, 39, has been Carney's top deputy and regularly fills in for the press secretary during daily briefings at the White House and aboard Air Force One when the president leaves Washington. Carney said Earnest would travel with Obama to Europe next week, and the press secretary said he would formally leave his job in mid-June.
Carney cited spending time with his wife, television journalist Claire Shipman, and children as a reason for his departure, but he did not disclose future career plans. Obama made the surprise announcement in the briefing room, cutting off Carney during an answer to a question about Ukraine.
"Jay has become one of my closest friends and is a great press secretary and a great adviser," Obama said. "He's got good judgement, he has good temperament and he's got a good heart. And I'm going to miss him a lot. I will continue to rely on him as a friend, an adviser after he leaves to spend as much of his summer as he can with his kids before he decides what's next for him."
Carney developed a reputation among his former peers as a disciplined and even-tempered spokesman who rarely disclosed news by mistake or made mis-statements that were damaging to the White House. Carney sparred with reporters regularly, as they pressed him on camera to respond to world crises, domestic politics and White House scandals.
Obama recalled Earnest's work on his 2008 campaign, noting that he served as communications director in Iowa. "In that role, you'd find him spending an extra hour or two helping young staffers make phone calls or knock on doors," the president said. "There was no task that was too small, no detail too unimportant for Josh to attend to."
Earnest is well regarded among White House reporters, and he was long viewed as a likely Carney replacement. Some reporters had speculated last year that Obama might someday replace Carney with Jen Psaki, a former White House deputy communications director and Obama's 2012 campaign spokeswoman who now serves as the State Department spokeswoman. Obama has not had a woman serve in the role of top spokesperson at the White House, although Jennifer Palmieri is the communications director, a top behind-the-scenes position in the press shop.
"More often than not people say to me, 'You have the hardest job or you have one of the hardest jobs,'" Carney said. "And I'm not saying it's easy every day, but I love it. It's an important interaction that takes place here. It's not always pretty. It could certainly be better. But to be a part of it is an honor and a joy for me. So no matter how tough the briefing is, I walk out of here having been glad to stand here."
Brendan Buck, former spokesman for House Speaker John A. Boeher (R-Ohio), often sparred with the press secretary, but Friday he wrote on Twitter that Carney had "a great run. Incredibly tough job, and rarely made a misstep."