The announcement, made by President Trump in an early morning two-sentence tweet, came one day before the FBI director that Mr Trump fired last month, James Comey, was to testify in public on Capitol Hill for the first time since his dismissal.
President Trump called Mr Wray “a man of impeccable credentials” and offered no more information about the selection, except to end the tweet with “Details to follow”.
Mr Wray served in a leadership role in the George W Bush justice department, rising to head the criminal division and overseeing investigations into corporate fraud, during the time when Mr Comey was deputy attorney general.
Mr Wray took charge of a task force of prosecutors and FBI agents created to investigate the Enron scandal.
With a strong law enforcement background, Mr Wray is a traditional choice for the job.
President Trump had considered current and former politicians for the role, including former Senator Joe Lieberman.
Although favoured by the president, Mr Lieberman would have faced a challenging confirmation process and he pulled his name from consideration.
House Republicans said that President Trump’s pick seemed like a good choice. Lawmakers attending a closed-door caucus in the morning said they had no early word of the president’s selection.
Republican Mike Conaway said, “At first blush, he seems like a great choice to lead the FBI.”
Mr Comey, during his appearance before the Senate intelligence committee, is expected to describe his encounters with President Trump in the weeks before his 9 May firing. Mr Comey could offer new details regarding discussions with President Trump about the federal investigation into Russia’s election meddling and possible coordination with the Trump campaign.
The White House and its allies have been looking for ways to offset that potentially damaging testimony and have been working on strategies aimed at undermining Mr Comey’s credibility.
Mr Wray works in private practice for the King & Spalding law firm. He represented New Jersey governor Chris Christie in the lane-closing investigation, in which two former Christie aides were convicted of plotting to close bridge lanes to punish a Democratic mayor who would not endorse Christie.