Are there any conditions that a Muslim man has to fulfill if he wants to divorce his wife? I mean if the wife is for example not listening to him and is not answering him in a nice manner and so on, which she did before, then is he allowed to divorce his wife on the basis of her behaviour or is he obliged to talk to her first even if he knows she will not listen to him anyway and will not change her behaviour?
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
In general, if the husband wants to divorce his wife, he should divorce her in accordance with the Sunnah, by divorcing her once during a period of purity in which he did not have intercourse with her, then keep her until her waiting period ends.
With regards to this matter that you mentioned, such a woman is abusive in her treatment of her husband in this manner, and if her husband issued divorce to her because of her bad attitude towards him, he would not be sinful, and he did not have to talk to her first (to solve the issue).
Divorce is permissible in principle, but it is hated if there is no reasonable need for it. In any case, the husband should not rush to divorce his wife just because of her bad attitude. Rather, it is better for him to advise her and remind her of Allah Almighty, and seek the help of her guardian for example, if necessary.
We point out to ensuring that the spouses should maintain the cohesion of the family and that respect prevails between them, and that each of them knows the rights of the other and fulfills them. In addition, if a problem arises, they should be careful and be wise in solving it, and not to leave room for the devil, so dispute and then separation happen.
Allah knows best.