Liberal Democrat deputy leader Simon Hughes has told the Leveson Inquiry that media reports damaged his chance to lead the party in 2006.
Mr Hughes told the inquiry into media standards and ethics he had been contacted by the Sun who told him they had obtained his phonecall records.
He said subsequent press coverage, which was about his relationships, hurt "his chance of winning the election".
He also spoke of how his phone had been hacked by the News of the World.
He went on to say he was unhappy police had initially failed to explore the possibility of bringing charges against others potentially involved in hacking.
In other evidence on Tuesday, ex-police detective Jacqui Hames said the News of the World had placed her and her police officer husband under surveillance in 2002.
She suggested this was because the paper had links to suspects in a murder case her husband was investigating.
Meanwhile, Deputy Assistant Commissioner Sue Akers revealed that 44 current and past MPs, and 10 peers, had been identified in Mulcaire's notes.
In a letter to the Culture, Media and Sport Committee, she indicated those numbers could rise as Operation Weeting continued. All of those identified so far had been informed, she said.
Mr Hughes, the MP for Bermondsey and Old Southwark, was named as a hacking victim in the 2007 trial of Clive Goodman, the News of the World's royal editor, and private investigator Glenn Mulcaire.
He received £45,000 in damages plus costs after settling with News Group Newspapers - the publishers of the News of the World - out of court.
In his evidence, Mr Hughes told the inquiry into media standards and ethics he had had some concerns about his phone messages in 2005 and 2006 following "mysterious" and "systematic failures".
He said he was then contacted by the Sun in 2006 while the Lib Dem Party leadership contest was ongoing and they told him they had obtained his phonecall records and wished to speak to him about a "private matter".
He agreed to speak to the paper after confirming the content of the phonecalls referred to.
In the January 2006 article, Mr Hughes told the Sun he had had relationships with both men and women but did not feel that should stop his leadership bid.
Before the revelations, Mr Hughes had been one of the favourites to take over the leadership role but he said subsequent press coverage hurt "his chance of winning the election".
He told the inquiry that he it was only in October 2006 that the Metropolitan Police told him private investigator Mulcaire had hacked his voicemails, he said.
He added: "What they didn't tell me was that Mr Mulcaire not only had that phone number but he had every other phone number, address, and other things.
"They did not tell me that he had, for example, the hotline in the office, which only a few people knew [or] my private phone number at home."
He said he believed more than one News of the World reporter was also involved in the hacking and he had not known the narrow nature of the charges brought against Mulcaire.
It was a lost "window of opportunity" and could have saved subsequent pain. "We lost three or four years in which illegal activity continued," Mr Hughes said.
But Mr Hughes said when he had asked police at that time if they were investigating anyone else, he was told "no".
He said: "What I am very unhappy about - and it seems to me was a complete failure - was to explore whether it would be appropriate to bring charges against other defendants at the same time as part of the same inter-related set of activities."
In a statement, he added: "I suspect that the police had shut down this investigation, much to the delight of News Group and ignored evidence of long-standing and widespread criminality."
Mr Hughes said police returned to see him in 2011 and "opened the books" Mulcaire had kept his notes in.
He said: "It looked to me that there was a pretty general trawl to look at anything that might lead anywhere that might lead to a story."
Former Met Police detective Jacqui Hames told the inquiry how working as a presenter on Crimewatch and dealing with the press was a "baptism of fire".
She told the inquiry that she needed counselling after the News of the World placed her and her husband, Det Chief Supt Dave Cook, under surveillance and she wanted to know why the police had not investigated why this happened.
Mr Cook had appeared on Crimewatch seeking information about the 1987 murder of private investigator Daniel Morgan.
But Ms Hames said Mr Morgan's company - Southern Investigations - whose members included suspects in the case - had "close links" to Alex Marunchak - a news editor at the paper.
In a statement, she said: "I believe that the real reason for the News of the World placing us under surveillance was that suspects in the Daniel Morgan murder inquiry were using their association with a powerful and well-resourced newspaper to try to intimidate us and so attempt to subvert the investigation.
"These events left me distressed, anxious and needing counselling, and contributed to the breakdown of my marriage to David in 2010."
She told the inquiry that former News of the World editor Rebekah Brook's defence that the paper had been investigating if the two had been having an affair with each other was "absolutely pathetic" as the couple's marriage was "common knowledge".