The judge, Stanley Sapire, told the high court that he and two of his colleagues had received an order from the royal palace to either drop the investigation or resign.
King Mswati is Africa's last absolute monarch, but has come under pressure in recent years to introduce democratic reforms and abandon polygamy.
The girl's mother went to court seeking the release of the 18-year-old girl, Zena Mhlangu, saying she was taken away without parental consent after the king chose her at a reed dance last month.
The court has been trying to get access to the teenager, who is kept at a royal guest house, to find out whether she actually wants to become the king's 10th wife.
Cheers
Judge Sapire read out a statement in a packed courtroom saying he and his colleagues would not resign and would stay on to safeguard justice.
"We conclude that in fealty to our oaths of office and duty, which we may not in good conscience abandon, we are bound to continue with the hearing.
"This we will do. We are satisfied that we can, despite what has happened, apply ourselves to conduct the proceedings and give judgement in this matter without fear and favour according to the land of the land."
Applause greeted his remarks in the courtroom.
First case
The 34-year-old king announced in August that he planned to marry once again, two months after marrying wives number eight and nine.
This is the first time the mother of a prospective Swazi Queen has taken legal action against the royal family.
Women rights activists have rallied behind Mrs Dlamini.
Official biographers say Mswati's father, King Sobhuza, had more than 125 wives during his reign of 61 years, which ended when he died in 1982.