Lew, 57, most recently served as the White House chief-of-staff.
As a former budget director for Presidents Obama and Bill Clinton, Lew has overseen budget talks in times of deficits and also surpluses.
As the secretary of the Treasury, Lew will run U.S. domestic financial policy and is charged with collecting federal taxes and managing public debt, among other duties.
Lew was confirmed with a 71-26 vote. Compared with the bruising confirmation battle of Chuck Hagel as Defense secretary, Lew's was a breeze.
President Obama said in a statement that he was "pleased that the Senate took bipartisan action today to confirm Jack Lew as our nation's next Treasury secretary."
"His reputation as a master of fiscal issues who can work with leaders on both sides of the aisle has already helped him succeed in some of the toughest jobs in Washington," Obama said.
Republicans who voted against Lew said they were concerned about his experience at Citigroup (C, Fortune 500) during the financial crisis. Lew had served as the chief operating officer at Citi Alternative Investments in 2008, which made bets against the housing market.
Lawmakers questioned an offshore investment in the Cayman Islands and a $900,000 bonus Lew received even as the bank was being bailed out by taxpayers.
"In the past, the president has railed again the 'fat cats' on Wall Street," Sen. Charles Grassley of Iowa, who opposed the confirmation, said Wednesday. "Today, the president nominates a man who took a bonus from a bailed-out financially insolvent bank.
Lew has said he did not make investment decisions at Citigroup and that he has paid taxes on all his investments, many of which he sold for a loss.