Locke, 59, was the nation's first Chinese-American governor, serving two terms from 1997 to 2005. He has promised to focus on job creation and to closely oversee the 2010 census.
Some Republican lawmakers have been critical of Obama administration comments indicating that the White House might seek greater control over the census.
Locke sought to dampen GOP concerns about the census at a hearing last week and fielded a barrage of questions and comments about digital television, broadband Internet connections and oceans policy.
The Commerce Department has broad responsibilities, including the census, many aspects of international trade, oceans policy and weather forecasts. It is also overseeing the nation's transition to digital TV.
As the nation's 36th commerce secretary, Locke, who was approved by voice vote, "will ensure American workers can prosper, our businesses can thrive and the economy can grow," said Senate Committee Chairman Jay Rockefeller, D-W.Va.
Sen. Maria Cantwell, D-Wash., said Locke "will bring strong leadership to the Commerce Department and understands the challenges many Americans face as we work to stabilize our economy."
Obama nominated Locke for the Commerce post last month, after his first two nominees withdrew. New Mexico Gov. Bill Richardson faced questions about the awarding of state contracts and Republican Sen. Judd Gregg of New Hampshire changed his mind about working for the Democratic president.
Sen. Patty Murray, D-Wash., said that while most people think the job of commerce secretary is simply to represent U.S. business, it is much more. The commerce secretary "always comes in thinking he will be the head of business. And then he finds out that's he's really the head fisherman," Murray said, repeating a joke often told by former Commerce Committee Chairman Ernest "Fritz" Hollings, D-S.C.
About half the Commerce Department budget is spent on the National Oceanic and Atmospheric Administration, which regulates the nation's fisheries, oversees the nation's oceans policies and includes the National Weather Service, among other agencies.