It depends on the type of sin.
Quran says there has already been for you an excellent pattern in Abraham. So this means that we should follow this pattern. He many times invited his people to monotheism by kindness. But they still insisted on Shirk and did not leave their idols and tried to kill prophet Ibrahim a.s.
A Muslims should disassociate and have animosity and hatred about Mushrik people (those who worship other than Allah like idol, Satan...). But hating is some different. We can disassociate one but still love him for guidance.
There has already been for you an excellent pattern in Abraham and
those with him, when they said to their people, "Indeed, we are
disassociated from you and from whatever you worship other than Allah.
We have denied you, and there has appeared between us and you
animosity and hatred forever until you believe in Allah alone" except
for the saying of Abraham to his father, "I will surely ask
forgiveness for you, but I have not [power to do] for you anything
against Allah. Our Lord, upon You we have relied, and to You we have
returned, and to You is the destination. http://tanzil.net/#60:4
Prophet Muhammad SAWW did so also. he invited people many times and many of them accepted but some still did not accept and tried to kill prophet and made wars like Badr, Uhod and other wars and tried to kill Muslims. so then prophet made around 100 wars against them (although himself did not participate in all of them directly).
But it is important to distinguish between clear Shirk and Hidden Shirk. This applies only to clear Shirk. Because many of believers have hidden shirk:
And most of them believe not in Allah except while they associate
others with Him. http://tanzil.net/#12:106
But a Muslim who believes in Allah but still is sinner is different.
There has certainly come to you a Messenger from among yourselves.
Grievous to him is what you suffer; [he is] concerned over you and to
the believers is kind and merciful. http://tanzil.net/#9:128
We should love and guide Muslims who are going astray and are sinner.