Praise be to Allah.
It is not permissible for a woman to seek divorce except when there is a reason that makes it permissible to do so, such as his refusing to spend on her, or evil and immoral conduct on his part, because of the report narrated by Abu Dawood (2226), at-Tirmidhi (1187) and Ibn Maajah (2055) from Thawbaan (may Allah be pleased with him) who said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Any woman who asks her husband for a divorce when it is not absolutely necessary, the fragrance of Paradise will be forbidden to her.”
This hadeeth was classed as saheeh by al-Albaani in Saheeh Abi Dawood.
It was narrated from ‘Uqbah ibn ‘Aamir in a marfoo‘ report (i.e., one that is attributed to the Prophet (blessings and peace of Allah be upon him)): “Women who seek khula‘ and separation are the female hypocrites.”
Narrated by at-Tabaraani in al-Kabeer, 17/339); classed as saheeh by al-Albaani in Saheeh al-Jaami‘, no. 1934
A woman may dislike her husband in such a way that it prevents her from giving him his rights. In that case it is permissible for her to separate from him by means of khula‘, in which case she should return the mahr (dowry) to him or give him what they agree upon. For information on cases in which it is permissible to seek khula‘, please see the answer to question no. 169847
Based on that, if there is a reason which makes it permissible to seek divorce, such as his not spending on your maintenance, then you have to ask the Islamic Centre to demand that your husband issue a divorce; if he refuses to issue a divorce, then you can separate from him by khula‘.
If it is proven that the husband is indeed harming the wife, and he refuses to issue a divorce, then the Islamic judge in your country, or the Islamic Centre in Western countries, can give you a divorce from your husband.
With regard to resorting to lies and false claims of rape or beating, this is not permissible, and a divorce based on that is not valid; in fact divorce obtained through civil courts that operate according to man-made laws is not valid, so long as your husband or the Islamic Centre has not issued a divorce to you.
Please see the answer to question no. 127179
To sum up:
Leaving your husband cannot be achieved except if he divorces you or accepts khula‘, or a ruling is given by the Islamic judge or Islamic centre that is run by Islamic scholars who deal with such matters. As for the civil court, this is only for documentation purposes, and it cannot authorise a separation between you and your husband. Telling lies will not benefit you at all, and will not give you the right to separate, in addition to the fact that lying is a sin.
It is clear from your question that your husband may not refuse to give a divorce, but divorce may result in you going back to your country, and this is why the lawyer suggested this trick to you. But it is a haraam trick that involves telling lies against the husband, and it involves lying and trying to trick the court, so bbBeware of the wrath and punishment of Allah.
If you do have to return to your country, then Allah may make that a way out for you, and He may bless you with a righteous husband there, with whom you will be happy.
You should remember that there is no comparison between a country where Islam is widespread and you can hear the adhaan, and a country that is the opposite of that. Think again about your situation and weigh things up, and adhere to the limits set by Allah, may He be exalted.
We ask Allah to make things easy for you and to set your affairs straight.
And Allah knows best.