Krishna Bahadur Mahara's office has denied the accusation, saying it is a politically motivated attempt at character assassination.
In the letter of resignation Tuesday, Mahara said he wants to make it easier for an independent and unbiased investigation of the allegation.
The speaker of Nepal's parliament, one of the country's leading Communist Party leaders, is facing allegations that he raped a government worker at her home while he was intoxicated.
Krishna Bahadur Mahara's office has denied the allegation, saying it's a politically motivated character assassination attempt.
Police refused to comment, but news reports said the woman claimed Mahara entered her house Sunday night while her husband was away and assaulted her.
A statement issued by Mahara's office said the allegation was baseless and that he was at his official residence on Sunday evening.