Hi,
U mean EXIT PERMIT, if you have signed a two year contract, in the same you should find a clause saying either of the party can terminate the contract if their not satisfied with clause 1,2,3.
So first go through your contract letter. And if the employer sponsored you from your country from there own expenses you may have to pay compensation… but depends.
U better consult your Embassy first & then the labor dept.