The vote was 54-45.
As attorney general, Barr will take over oversight of the Robert Mueller investigation into alleged Russian intervention in the 2016 presidential election. During his confirmation hearing before the Senate judiciary committee, Democrats expressed concern about whether he'd allow Mueller to finish the probe and whether he'd release the results upon its competition.
Barr criticized Mueller's investigation in a memo he wrote to Deputy Attorney General Rod Rosenstein last year.
But he told the judiciary committee he wouldn't interfere in the process and pledged to keep it free of "partisan politics."
"I don't believe Mr. Mueller would be involved in a witch hunt," Barr said.
"I can assure you that, where judgments are to be made by me, I will make those judgments based solely on the law and will let no personal, political, or other improper interests influence my decision," he said in prepared testimony.
Matthew Whitaker has served as acting attorney general since Sessions' departure
Bush appointed Barr to the top law enforcement post in 1991, where he stayed for 14 months. In 1992, he was criticized for his handling of a banking loan scandal involving Italy's Banca Nazionale de Lavoro.
After serving under Bush, Barr was a corporate executive for 14 years for Verizon.