Stephanie Rhodus, appearing as a defendant, was nursing her 8-month-old son Archer when District Court judge Peter Knight reprimanded her.
"Ma'am, you need to cover up," Knight tells Rhodus, heard in a recording obtained by ABC News affiliate WLOS. "For you not to realize that is absolutely ridiculous. Step outside, and cover up right now. Stand up, and go, now."
"To nurse the child in the courtroom is just absolutely inappropriate. Step outside and button up."
"I just apologized and I stopped breastfeeding him and I tried to continue on with my case."
Women in North Carolina are legally free to breastfeed "in any public or private location where she is otherwise authorized to be," according to state law.
Rhodus was in court defending herself against her mother, in the hopes of regaining custody of her 8-year-old son.
But after Knight scolded her, Rhodus says it was hard to keep her focus on the case.
"After I stopped feeding him he became distressed, and fussy, and agitated," she says. "It made the rest of the proceedings pretty difficult."
RELATED VIDEO: I Had So Much Judgment': Celeb Moms on the Battle to Breastfeed (... and Cabbages!)
Rhodus believes that the judge was biased against her because she was nursing, and is appealing his ruling. She says that at a prior hearing a week and a half ago, the female judge didn't have a problem with her decision to breastfeed in court.
"[Knight] had no interest in what I was telling him," Rhodus says.
She will be back in court on April 19.