American Quotations (edited by Gorton Carruth and Eugene Ehrlich) listed the quote as:
[New Jersey resembles] a beer barrel, tapped at both ends, with all the live beer running into Philadelphia and New York." - Attributed to Benjamin Franklin by Abram Browning, in an address at the Centennial Exposition in Philadelphia in 1876, quoted in Miriam V. Studley, Historic New Jersey Through Visitors' Eyes, 1964.
So the first time it appeared in print, it was a quote of a quote that would have had to have been made almost 100 years before. Just to make things more confusing, it seems that Abram Browning might have coined the phrase "Garden State" during his speech at the Centennial Exposition. According to the 1926 work Jersey Waggon Jaunts,
"In his address Mr. Browning compared New Jersey to an immense barrel, filled with good things to eat and open at both ends, with Pennsylvanians grabbing from one end and the New Yorkers from the other. He called New Jersey the Garden State, and the name has clung to it ever since."
A New York Times columnist thought that the quote might be the world's first New Jersey joke. Yup, today's just been a barrel of laughs.