The former Pakistani diplomat at the centre of a scandal threatening to bring down the government in Islamabad says he has become embroiled in a "witch-hunt" against democracy in Pakistan.

A judicial commission on Monday began investigating allegations that could lead to treason charges against Husain Haqqani, who resigned as ambassador to Washington following claims he was behind an anonymous memo asking for US support to stave off a military coup in Pakistan.

The case has again drawn battle lines between the civilian government and the military in Pakistan, where the generals have ruled for half its existence. Haqqani, who denies knowledge of the memo, was a key adviser to President Asif Ali Zardari.

Haqqani was summoned to Pakistan in November and has, in effect, been under house arrest since, with travel abroad banned. He is staying at the heavily guarded official residence of the prime minister in Islamabad, afraid that religious extremists or military agents will kill him if he ventures out. He said he was there for his "personal safety and security". Last year, militants assassinated two senior officials of the ruling Pakistan Peoples party.

"Some people want to have the right to judge the patriotism of civilians. Some have joined the witch-hunt to keep democracy weak or even get rid of it if they can," said Haqqani, speaking to the Guardian in a worn-looking sitting room where he receives few visitors.

In Washington, where Haqqani served for nearly four years, he was lauded as one of the best-connected diplomats in town, a smooth-talking, hyperactive defender of Pakistan on American television screens and in the corridors of the US capital. He is credited by some with keeping aid money flowing and relations with the US alive as the alliance between the two countries foundered in recent years over charges that Pakistan was playing a "double-game" by secretly supporting the Taliban.

In Pakistan, however, Haqqani was persistently vilified by the military establishment and the country's press, painted as an American stooge and a too-clever-by-half strategist for the unpopular Zardari. Many in Pakistan believe it is the president who is the real target of the "memogate" furore, although he insisted over the weekend that he was not going to quit.

Pakistan's armed forces, used to controlling the relationship with the US, deeply resented Haqqani's contacts and level of access in Washington. Democracy was restored in Pakistan in 2008, but the government has been shaky, with simmering tension with the military. Haqqani had advocated closer ties to the US and was a strong critic of the army's role in politics and its policy of supporting jihadist groups, laid out in his 2005 book, Pakistan: Between Mosque and Military.

"I am being targeted for my views and beliefs on civil-military relations and US-Pakistan ties, not because I did anything wrong," said Haqqani.

The memo at the centre of the controversy was sent in May to the then top US military official, a week after Osama bin Laden was found and killed in northern Pakistan. Its existence only came to light in October when the man who delivered the missive, Mansoor Ijaz, a mysterious American businessman of Pakistani origin, wrote about it, kicking off the current storm, which quickly made it all the way to the Pakistani supreme court. Ijaz claims he was acting on Haqqani's instructions.

The head of the military's Inter-Services Intelligence (ISI) spy agency, Lieutenant-General Ahmed Shuja Pasha, had told the court in writing that he met Ijaz and had "seen enough corroborative material to prove his version of the incident". Last month the court appointed a fact-finding commission of three judges to investigate the allegations.

"I should not have been subject to a media trial. I should not have been declared suspect by a military official prior to the completion of an inquiry, on the say-so of one man, and I should not have been barred from travel abroad without any charges being filed against me," said Haqqani. He told the court on Monday he had "no knowledge of the origin, authenticity or purpose of the said memo".

The case turns on the word of Ijaz, who was apparently in Switzerland on Monday. His lawyer, Akram Sheikh, said he would return to Pakistan to give evidence next week though he added that Ijaz was "scared" for his safety in Pakistan.

Ijaz was a ferocious critic of Pakistan's military but then he met its spymaster, Pasha, in October in London where he handed over his evidence about the memo to him. Sheikh said Ijaz was "not an ISI man" and that all he wants is "self-vindication", after Haqqani denied collaborating with him to create the memo that is driving Pakistan's politics.