Experience letter cannot be withheld by the employer, the employee can submit a final application letter under acknowledgement to higher authorities of the company such as Managing Director, Company Secretary and demand the experience certficate be given within 15 days. If they do not give you the experience letter even after this then you can issue a legal notice by yourself or with the help of your lawyer. You can also move to labour court if you are an workmen or a wage worker.
If a company terminates you on whatever basis they cannot withhold your experience or service letter. You are capable of receiving an experience letter or relieving letter whatever you call it as. Every employee who has worked more than 6 months in an organization have a right to receive the letter from their employer, irrespective of the fact that they resigned or have been terminated.
You should remember that the employer cannot terminate you right away he has to serve you notice of your termination and if you have served the notice period you should receive an experience letter.
Experience letter gives you a good acknowledgment from the previous employer stating about your work that can add up to your resume to make it look stronger for new employer
Reference: The Companies Act 2013