The bill, officially the Agriculture Act of 2014, includes provisions for crop insurance, and helps the rural community with investments in hospitals, schools, affordable housing and broadband infrastructure and assists businesses developing biofuels, among other things, Obama said at Michigan State University in East Lansing before signing the bill.
"And it does all this while reforming agriculture programs by clamping down on loopholes" that pay farmers whether they plant crops or not and "saves taxpayers' hard-earned dollars" by supporting farmers when disaster strikes or prices drop.
After nearly four years of fighting between Democrats and Republicans, the five-year, $956.4 billion package passed Congress with broad bipartisan support. It was the first time Congress has approved a new farm bill since 2008.
The massive package includes a sweeping overhaul of federal farm and nutrition policies on what farmers grow, how food is packaged and sold and how the government helps the poor pay for their food.
While the bill doesn't include everything he, Democrats or Republicans wants, Obama said it was a "good sign" of Democrats and Republicans putting aside partisan differences to pass the bill.
Despite its name, the farm bill is "not just about helping farmers," Obama said. "It's creating more good jobs and gives more Americans a shot at opportunity."
Besides putting in place reforms, the farm bill "helps make sure American children don't go hungry," Obama said against a backdrop of farm equipment, produce and fruit.
Those who use the Supplemental Nutrition Assistance Program -- widely known as the food stamp program --do so because they need "a bridge to help them get through tough times," Obama said.
"They're not looking for a handout, they're looking for a hand up," he said.
The president said the majority of SNAP participants were children, the elderly and those with disabilities. In 2012, he said the food stamp program kept nearly 5 million people, including 2 million, out of poverty.
He said any farm bill presented to him had to include "protections for vulnerable Americans. This bill does that."
Obama also used the bill-signing to tout his new "Made in Rural America" program to help expand markets for farm products worldwide.
The White House, in a release, said Obama directed his administration, working through the White House Rural Council, to lead a new "Made in Rural America" import and investment initiative. The initiative is tasked with bringing together federal resources to help rural businesses and leaders take advantage of new investment opportunities and access new customers and markets abroad.
Obama instructed the Rural Council -- working with the departments of Agriculture and Commerce, the Small Business Administration, the Export-Import Bank, the Office of the U.S. Trade Representative, and others -- to commit to connecting more rural businesses of all types to export information and aid through a comprehensive strategy during the next nine months.
Among other things, the strategy includes training sessions and conferences designed to connect investors with rural business leaders, promote rural exports and provide training and resources to local USDA Rural Development staff to counsel businesses on export opportunities and resources.
During his remarks, Obama said he had lunch with Detroit's new mayor, Mike Duggan.
"He told me that if there's one thing he wants everybody to know, it's that Detroit is open for business," Obama said.
The White House said it invited 50 members of Congress to the signing, but few attended, all Democrats.