He has a restaurant where he sells alcohol, and he gave her the second part of the mahr from this money
There is no sin on you for what you took of the second part of the mahr, even if your husband’s wealth was as you describe. That is for two reasons:
1 – The scholars have stated that if a person’s wealth is a mixture of halaal and haraam, and they cannot be told apart, it is permissible to interact with him, buying, selling, lending and so on, just as it is permissible to eat from his wealth. The Prophet (peace and blessings of Allaah be upon him) and his companions interacted with the Jews, and ate their food, although their wealth was not free of haraam elements, because they dealt in riba (usury) and consumed people’s wealth unlawfully. What is meant by not telling the halaal apart from the haraam is that your husband’s wealth – for example – combined the price of the alcohol with the price of the food and permissible drinks, and the one was mixed with the other.
2 – Some scholars are of the view that wealth that is haraam because of the manner in which it was acquired is haraam only for the one who acquires it, and it is not haraam for the one who takes it from him in a permissible manner.
The wealth that your husband acquired from selling alcohol is haraam because it was acquired in a loathsome manner. But it is haraam for your husband only. The mahr that you took from him is halaal for you.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said: As for that which is haraam because of the manner in which it was acquired, such as money that was obtained through cheating or through riba or lying and so on, it is haraam for the one who acquires it, but it is not haraam for anyone else, if he acquires it from him in a permissible manner. This is indicated by the fact that the Prophet (peace and blessings of Allaah be upon him) used to deal with the Jews, even though they consumed haraam things and took riba. This indicates that it is not haraam for anyone other than the one who acquires it. End quote from Tafseer Soorat al-Baqarah (1/198).
Conclusion: You taking the mahr from this wealth is permissible and there is no sin in that.
And Allaah knows best.