Appearing at a parliamentary committee on Tuesday Mr Lewis said an individual supporting one of the campaigns had been "casting aspersions and making defamatory comments" about him.
The person was not an elected politician, Mr Lewis said, but was at a "senior level" backing one of the contenders to replace Boris Johnson.
During the period Mr Lewis, a champion of consumer rights, had been outspoken about the need for additional help on energy bills.
In late August he had said that existing support pledged by the government would be swallowed by a bill rise in October and that bills would become "mathematically unaffordable" for many.
Speaking about trust in public institutions at the Digital, Culture, Media and Sport Sub-committee on Tuesday Mr Lewis said:
"I was informed that somebody recently was casting aspersions and making defamatory comments about me. I was informed by a newspaper.”
Noting that the claims were without foundation, he said: "In the end, the story wasn't printed because the news agenda moved on.
"But yes, I have had people in senior levels, members of government, cast aspersions over the level that I could be trusted.
"The motive of this one was pretty clear, because they they thought that what I was saying was not in the interest of the person they were promoting for a leadership campaign."
Mr Lewis declined to say who had made the claims about him to the press, stressing: "I am not the primary source of that information. I was told by a newspaper who were going to write a story on it."
But he said the person who made the claims was "not anybody who was elected".
UK news in pictures
The Conservative leadership election to replace Boris Jonson took place amid a backdrop of concern about rising energy bills – on which Mr Lewis is a trusted commentator.
Frontrunner Liz Truss, who ultimately won, repeatedly said she did not want to give "handouts" to households, while Rishi Sunak said more help would be needed.
Ultimately Ms Truss won the race and introduced an energy price guarantee limiting the unit price of energy.
However her premiership disintegrated after a disastrous tax-cutting budget and she was replace by Mr Sunak in as second leadership election.
During the first leadership contest Mr Lewis issued a plea to both contenders, telling them: "Liz Truss or Rishi Sunak, on the day you become PM I beg, plead, pray you will bridge that gap. If not the physical and mental health risk to millions is unthinkable ... if the package is right, as I did in May, I'll be the first to applaud."