The authorities on Monday released Madhav Kumar Nepal and Amrit Bohara of the Communist Party of Nepal (United Marxist Leninist), officials said.
Hundreds of lower-level political leaders and activists, however, remain in detention and the Home Ministry said in a statement that it was extending the detentions of 175 of them without giving a reason.
The king is under strong pressure from foreign governments to restore democracy and has showed some signs of seeking reconciliation with political rivals in recent days.
On Saturday, he lifted the emergency rule he declared on 1 February, although he still tightly controls the government.
"The king may have announced withdrawing emergency rule, but in reality there are still restrictions and many politicians continue to be in jail," Madhav Kumar Nepal said after his release.
"Unless the king gives up direct rule, restores powers back to the people and frees all political prisoners, there can be no dialogue between the political parties and the king," he said.
Also on Monday, the government restored mobile telephone service, three months after severing it under emergency rule to prevent the opposition from organising anti-government rallies.
But officials at state-owned Nepal Telecom said service was only restored in capital Kathmandu and only to 34,000 subscribers.