If you are in India, you're in trouble. It's illegal as per India law to have two jobs. My advice is assuming you are based in India.
I will give you a general and least ethical but most practical advice. However, it is really important to see your job contract to give proper advice.
Firstly, their decision of sacking off just for sending a proposal was unfair. This gives me an idea that you are working in a small firm that only cares for more business and more money.
If you have never done any freelancing since you got this job, you can simply ask them to buzz off. They can never do anything to you.
If you are a Web Developer/SEO/Writing guy you can in fact threaten them to stop or else this matter can go on the internet. If they really care for their reputation, then they will take this seriously and finish this off.
If you want peace of mind, then ultimately the most they will want from you is money. I personally don't recommend this, but in case they are asking for something that is affordable to you, you can pay them. But since they already didn't pay you for two months, I recommend asking them for a proper relieving letter and experience letter, otherwise take this to Twitter and everywhere on the Web.