Sorry, but I find this very funny. Your employer is obviously immature and not suited to do business. Even if someone manages to keep an unhappy employee on the job, the damage the employee could do to a live project is horrendous! I hope you have:
1. Given notice of resignation in writing.
2. Clearly written your intention to serve the notice period.
3. Received acknowledgment or proof of delivery of the resignation.
4. Received a reply that refuses to accept or threatens.
I also assume that there is no bond requiring you to serve a certain period of time which is still pending.
If you have given a resignation, the company cannot refuse to accept it. Eventually, they have to release you. They have no choice. The only ground available is inadequate notice. If you have served adequate notice, then they have no option but to release you. If the notice period is over, send an email and a letter asking them to assign a person for you to hand over. If the notice period is not over, a week from the end of the notice period, you need to send them a reminder of your last day and ask them to let you know to whom you are required to give your handover.
You can reply to their email that you are not willing to take back the resignation and that you will not continue to work after the notice period.
They cannot initiate legal notice for resigning with notice. Even if they do, the courts will throw it out, with costs.
However, be prepared for the following:
- They will not give you your last salary and settlement.
- They will not give an experience letter and may provide bad feedback in case of a background reference check.
You will have to be ready to fight for your salary (or forget about it and move ahead) by taking the legal route.