"I accept this responsibility and will discharge it to the best of my ability," Mueller said in a brief statement.
In a statement released by the White House, Trump said: "As I have stated many times, a thorough investigation will confirm what we already know - there was no collusion between my campaign and any foreign entity. I look forward to this matter concluding quickly."
The appointment gives Mueller, who led the FBI through the Sept. 11 terrorist attacks and served under presidential administrations of both parties, sweeping powers to investigate whether Trump campaign associates colluded with the Kremlin to influence the outcome in his behalf, as well as the authority to prosecute any crimes uncovered during the probe.
The broad mandate, beyond any specific Trump-Russia connection, also covers "any matters that arose or may arise directly from the investigation" - suggesting Mueller could explore the circumstances of the firing last week of FBI Director James Comey as well as a memo that Comey drafted to chronicle a February conversation with the president.
Deputy Attorney General Rod Rosenstein, facing scathing criticism for authoring a memo that preceded Comey's firing, said in a statement that Mueller's appointment was "necessary in order for the American people to have full confidence in the outcome."
"What I have determined is that based upon the unique circumstances, the public interest requires me to place this investigation into the authority of a person who exercises a degree of independence from the normal chain of command," Rosenstein said in a statement.
The appointment came amid a growing Democratic outcry for someone outside the Justice Department to handle the politically charged investigation.
It followed the revelation Tuesday that fired Comey had written in a memo that Trump, in a February meeting in the Oval Office, had asked him to end an investigation into former national security adviser Michael Flynn. The White House has denied that account.
Lawmakers of both parties praised the announcement, with Sen. Dianne Feinstein, the top Judiciary Committee Democrat, saying there was "no better person who could be asked to perform this function."
"He is respected, he is talented and he has the knowledge and ability to do the right thing," she said in a statement.
Sen. Richard Burr, a North Carolina Republican and chairman of the Senate intelligence committee, called the appointment a "good decision."
"By having somebody like Bob Mueller head whatever investigation assures the American people that there's no undue influence, be it here, be it at the other end of Independence Avenue or within the Justice Department or FBI," said Burr, whose committee has been conducting its own investigation into Russia's election interference and possible ties with the Trump campaign.
Mueller, a former federal prosecutor at the Justice Department, was confirmed as FBI director days before the 9/11 attacks that would ultimately shape his tenure. The FBI's counterterrorism mission was elevated in those years, as the U.S. intelligence agencies' structure was changed to better position America to prevent another attack of that magnitude. He was so valued that President Barack Obama asked him to stay on two years longer than his 10-year term.
He was succeeded by Comey, who was fired May 9. The White House initially cited a Justice Department memo that criticized his handling of the Hillary Clinton email investigation, but Trump has since expressed frustration with "this Russia thing" and said he had already been thinking about dismissing Comey.
The Justice Department said Mueller has resigned from his job at a private law firm, WilmerHale, to take the job of special counsel. That firm is also home to Jamie Gorelick, who has also represented Ivanka Trump.
As special prosecutor, Mueller will have all the same powers as a U.S. attorney, though he will still ultimately report to Rosenstein. Still, he is not subject to the day-to-day supervision of the Justice Department. He can keep the same investigators in place, or request new or additional staff including from outside the department.
He will request a budget that includes personnel.
Rosenstein appointed Mueller under a statute that has been used only once, in 1999, when John C. Danforth was appointed to investigate allegations of government wrongdoing in the siege at the Branch Davidian compound in Waco, Texas.
Danforth's investigation cost millions of dollars and included hundreds of interviews and a restaging of the final hours of the 51-day standoff with federal agents. He ultimately produced a 150-page report clearing then-Attorney General Janet Reno and other top government officials of any responsibility.