The NUJ's Scottish branch claims members are facing increasing levels of intimidation and bullying as the debate over Scottish independence intensifies.
The NUJ warning comes less than a week after BBC Scotland's Newsnight was accused of having a pro-independence bias by Labour MSP Ian Davidson, who repeatedly referred to the current affairs show as 'News Nat Scotland'during an on-air row with presenter Isabel Fraser.
The NUJ believe there is a growing hostility toward journalists fuelled largely by social media allowing contributors to make personal attacks on individuals anonymously.
The union said in a statement: 'The tone of the debate seems to have made it increasingly common for those who do not wish anonymity - some of them in prominent and responsible positions - to make personal attacks on journalists for doing their jobs.
'This is changing the nature of journalism. News organisations need to be aware that employers have a responsibility to provide a duty of care to their employees, to protect their reputations and to ensure they are able to carry out their roles free from intimidation and bullying."
The union revealed it had already advised a number of journalists in making legal complaints to the police – and warned it would 'name and shame'individuals and organisations that threatened or bullied members.
'More widely, the NUJ asks those in positions of leadership to consider carefully the implications of their attacks on journalists for asking challenging questions,'it added.
'If that is to be interpreted as bias, and therefore the journalist is deemed to be open to personal criticism and abuse, then the nature of public debate will be debased, and we will all suffer.
'We also challenge news organisations, and editors, to question their own values when they give column inches or airtime to attacks on journalists from rival organisations. As journalists, we need to ask where that leaves our role, collectively, in holding those in power to account."
The NUJ said it was particularly concerned about 'threats about future employment'at the BBC 'as well as public labelling of journalists and programmes as being biased".
NUJ Scottish organiser Paul Holleran added: 'In recent weeks, protestors outside the BBC offices in Glasgow handed out leaflets warning journalists that they faced losing their jobs in an independent Scotland, as a result of allegedly being biased in favour of the union.
"This week, the Labour MP, Ian Davidson, accused one of the corporation's most experienced and talented journalists of political bias against the union, and levelled the same accusation at the makers of the programme Newsnight Scotland. He did so without producing any evidence to back his claims.
"Robust debate is fine. Pointing out when journalists get their facts wrong is expected and welcomed. But NUJ members believe in a free press, a fair media, with journalists allowed to do their jobs free of intimidation.
'We hope the politicians, and those who follow politics take this on board and act with a bit of maturity and understanding of the role of journalists in holding those in power to account.'