Dear Sir,
As per Section 168 of the Companies Act, 2013: -A director may resign from his office by giving a notice in writing to the company and the Board shall on receipt of such notice take note of the same and the company shall intimate the Registrar in such manner, within such time and in such form as may be prescribed and shall also place the fact of such resignation in the report of directors laid in the immediately following general meeting.
Further after receiving the acknowledgement from the Company for his resignation he can File DIR-11 with the ROC within 30 days of his resignation .
As you mentioned above that there are Two Directors only in the Private Company then also he can file his resignation with the Company and Other Director after receiving his resignation letter has to call a Borad meeting for placing his resignation letter in the Board meeting and releiving him of his duties and then he has to make appointment of other Director in that meeting so that there is Compliance of Sec.149 of Companies Act,2013 to have Minimum two Directors in case of Private Company.
So in your case Director can file his resignation letter and after receiving the acknowledgement from the Company he can File the Form DIR-11.