To the best of my knowledge this is not a Hadeeth of Nabi (Sallallaho Alaihe Wassallam) but a saying known amongst the Ulama and it is ascribed to Allamah Ali Ad-Diqaaq Nishapuri Asha'fae (HA) for the first time usage, the original is as follows:
الساكتُ عن الحقِّ شيطان أخرس
A "slightly different" version is also present in الرسالة القشيرية في التصوف and this is where it has become famous in Tassawuff circles. Imam Nawawi (RA) has reproduced this in Kitaabul-Adhkaar as follows and many Sufees have reported this version instead of the original (but similar meaning):
وروينا عن الأستاذ أبي القاسم القشيري رحمه الله في " رسالته " المشهورة قال : الصمت سلامة ، وهو الأصل ، والسكوت في وقته صفة الرجال ، كما أن النطق في موضعه أشرف الخصال ، قال : سمعت أبا علي الدقاق رضي الله عنه يقول : من سكت عن الحق فهو شيطان أخرس.
I am not a Scholar so I could be absolutely wrong and your clarification on this matter would be most appreciated and if you cannot ascribe this to our Nabi (Sallallaho Alaihe Wassallam) then you are requested to consult Ulama and take further (corrective) action as per the obligations of Islamic Shariah when a statement is ascribed to Nabi (Sallallaho Alaihe Wassallam) and there is a chance that it may not be accurate.
In any case if would be most appreciated if you can present this Hadeeth and its chain, may Allah (SWT) reward you in this world and the next (Ameen).
Hazrat (RA)'s advice is in line with the beautiful Hadeeth of Nabi (Sallallaho Alaihe Wassallam):
من رأى منكم منكراً فليغيره بيده، فإن لم يستطع فبلسانه، فإن لم يستطع فبقلبه، وذلك أضعف الإيمان
Nabi (Sallallaho Alaihe Wassallam) said Whoever among you sees an evil action, let him change it with his hand [by taking action]; if he cannot, then with his tongue [by speaking out]; and if he cannot, then with his heart [by hating it and feeling that it is wrong] – and that is the weakest of faith” [Muslim]
This cannot be undone and I am sure it will be greatly appreciated.