The pair will face a court hearing later this month over allegations that they went against the orders of Edinburgh Sheriff Court.
The mother in question mounted a legal challenge earlier this year over the decision to restrict access to her two children, who had been taken from her and placed in care for their own protection.
Sheriff Kathrine Mackie ruled in May that the woman was entitled to see her children more often than a children’s panel had determined earlier this year.
It is alleged, however, that the two Edinburgh City Council social workers tasked with handling the case stepped in the following month after the youngsters appeared distressed following further visits from their parent.
Staff took the decision to suspend a further scheduled meeting between the parent and children while an urgent review over access was undertaken by a children’s panel.
But now, Sheriff Mackie has ordered the pair to attend the city court later this month. If found guilty, they could face jail and may be later struck off by the Scottish Social Services Council.
The Scotsman understands, however, that the two social workers had not acted alone and had sought advice from senior lawyers at the local authority, and council chiefs said they will support their staff.
A council spokesman said that the two members of staff were “experienced child-protection managers” and that it was offering support to them over the proceedings.
The union Unison, which represents social workers, said that the case was “unprecedented” and had far wider implications should the employees be found in contempt.
A union spokesman said: “The social workers have an overriding duty under the Children (Scotland) Act to ensure the child’s welfare is paramount in all that they do.
“This gives them a dilemma when a legal decision [granting access] is made and social workers believe this is harming the child.
“They therefore have a duty to act. And in these circumstances, they were acting not on their own but on behalf of the agency for these children.”
He added: “As far we know, this is an unprecedented case and it would have significant implications for social work across Scotland were this to be upheld.”
It is understood that union chiefs have arranged for leading solicitors to represent the two social workers at the hearing.
A source with knowledge of the case, claimed: “The staff fully implemented the sheriff’s decision and granted greater access. After something like five visits, the two staff took this action because of the clear distress of the young children.
“They suspended a single contact meeting [between the parent and children] while a children’s panel carried out a review.
“Each of these actions was taken in consultation with the council’s legal team so it’s simply not the case that they were acting alone.”
Ruth Stark, spokeswoman for the Scottish Association of Social Workers, which represents the profession, said that the case was “unusual”.
She said: “Social workers are required to follow through with the decision of the courts. One can only assume that if the contempt action is being considered, it’s because social workers are alleged not to have followed it. A decision is made by the court or a children’s hearing panel over the amount of contact.
“If the court makes an order, the social workers are required to follow that.”
Ms Stark added: “It is a very unusual case because social workers really always comply with the order of the court. It is really only in cases of life or limb that they would go against such a decision.”
Contempt of court cases in Scotland are handled by sheriffs or judges who use their discretion to determine whether the business of the court has been disrupted or jeopardised. As such, the two social workers have not been charged with an offence.
Cases are uncommon but include the use of mobile phones. Another example was the appearance of an undressed Stephen Gough, the naked rambler, at a hearing in 2012.
The charge is most commonly associated with the media and the publication of details surrounding a case which could create “a substantial risk of serious prejudice”.
Punishments are most commonly fines but it carries a maximum sentence of three months.
It is not known why the children were originally removed from their mother, who is from the Edinburgh area.
Neither the woman nor the children involved in the case can be named in order to protect their identities.
A spokesman for Edinburgh City Council said: “We are offering every support to two experienced child-protection managers who are due to appear at Edinburgh Sheriff Court in relation to contempt of court allegations.”
Profile: Experienced sheriff who has handled diverse cases
Kathrine Mackie is the city sheriff who most recently hit the headlines presiding over the trial of Bill Walker MSP, which saw him convicted of 23 charges of abuse against three former wives.
Sheriff Mackie also oversaw proceedings as Edinburgh City Council and the Essential Edinburgh business group tried to evict Occupy movement protestors, who spent four months camped in St Andrew Square in 2011 and early 2012.
She also sentenced Lord Watson, the Labour peer convicted of setting fire to upmarket city hotel Prestonfield House, during the Scottish Politician of the Year event in 2004, to 16 months in jail.
The Scotsman in 2002 reported on Scotland’s increasingly busy courts and delays in the handling of cases for a series called ‘Is time running out on the law?’.
Edinburgh Sheriff Court was studied as it was among the most backlogged.
Sheriff Mackie was then heavily critical of delays. At the time she criticised the procurator fiscal for allowing an uncontested trial – in which the victim said the alleged attacker was clearly not his assailant – to be brought before her after months of preparations.
She said it was an “appalling waste of time” for all the witnesses who had appeared.