The woman managed to keep up the pretence by altering her daughter's birth certificate while in hospital and christening her 'Samuel'.
She managed to convince the baby's father and grandparents 'she' was a 'he' by dressing her in boys' clothes, only letting her play with boys' toys and cutting the little girl's hair short.
The truth only came to light when the girl's suspicious aunt peeked under the two-year-old's nappy.
Now the mother, from Goiania, central Brazil, is facing legal action while her daughter is being looked after by foster carers.
The mother - who has not been named - claimed she did it because she had been abused as a child and didn't want her daughter to suffer in the same way.
She explained that when she left hospital she scratched out a tick on the 'female' box on the child's birth certificate and marked 'male' instead.
That allowed her to dupe a register office so the girl was listed as male. The girl's paternal grandmother told Record TV she never once imagined that her grandchild wasn't a boy.
She said: "I didn't suspect a thing. For me, he was a boy. Why would I think anything different?
"It was an aunt who had doubts about Samuel's sex, but she didn't tell the rest of the family. She asked to hold Samuel at a family party and managed to look in her nappy.
"It was a huge shock for everyone. Now I have to get used to the fact I don't have a grandson any more, I have a granddaughter."
More on Parentdish: Genderless baby revealed as a boy