Brown discharge could mean a miscarriage but not always.
Usually when you have a miscarriage you'll have heavy bleeding from the Vagina and also blood coming out that looks like clots.
If it's just brown discharge and you're not bleeding heavily then it's likely not a miscarriage but I would go see the doctor to find out for sure.
Miscarriages usually happen due to an infection in the uterus.