As he penned his name on the five year measure at Michigan State University, Obama said the wide-ranging bill "multitasks" by helping boost jobs, innovation, research and conservation. "It's like a Swiss Army knife," he joked.
But not everyone is happy with the legislation and Obama acknowledged its passage was "a very challenging piece of business."
The bill expands federal crop insurance and ends direct government payments that go to farmers whether they produce anything or not. But the bulk of its nearly $100 billion per year cost is for the food stamp program that aids 1 in 7 Americans.
The bill finally passed with support from Democratic and Republican lawmakers from farming states, but the bipartisan spirit didn't extend to the signing ceremony where Obama was flanked by farm equipment, hay bales and Democratic lawmakers. White House press secretary Jay Carney said several Republicans were invited, but all declined to attend.
Conservatives remain unhappy with the bill and its generous new subsidies for interests ranging from Southern peanut growers and Midwest corn farmers to the Northeast maple syrup industry.
They also wanted much larger cuts to food stamps than the $800 million Congress finally approved in a compromise. Agriculture Secretary Tom Vilsack told reporters he did not expect the cut of about 1 percent of the food stamp budget to have a significant impact on recipients.
Obama promised in his State of the Union address last week to make 2014 a year of action, using his presidential powers in addition to pushing a Congress that usually is reluctant to go along with his ideas. In that spirit, he's coupling the signing of the farm bill with a new administration initiative called "Made in Rural America" to connect rural businesses with federal resources that can help sell their products and services abroad.
Obama's trip was a reward for Sen. Debbie Stabenow, D-Mich., who as chairwoman of the Senate Agriculture Committee helped broker the hard-fought farm bill compromise after years of setbacks. Michigan State, a leading agricultural research school, is Stabenow's alma mater.
Obama also squeezed into his three-hour visit to Michigan a lunch with Detroit Mayor Mike Duggan. Duggan took office last month as the city is going through the largest municipal bankruptcy in U.S. history.