Viscount Simon, 73, a Labour peer who has been a member of the House of Lords for more than 20 years, raised concerns about the "smelly emissions".
His comments came as energy minister Baroness Verma answered questions in the Upper House on how the Government was tackling climate change.
Lord Simon said: "In a programme some months ago on the BBC it was stated that this country has the largest production of baked beans and the largest consumption of baked beans in the world."
To laughter from peers, he asked Lady Verma: "Could you say whether this affects the calculation of global warming by the Government as a result of the smelly emission resulting there from?"
Lady Verma described his question as "so different".
But she added: "You do actually raise a very important point, which is we do need to moderate our behaviour."
A study last December suggested the total value of baked beans sold in the previous year had fallen by £20.8 million to £339.3 million in the UK.
Lord Simon's grandfather Sir John Simon, a Liberal, was given a peerage in 1940 after serving as Home Secretary, Foreign Secretary and Chancellor.