Ana Beatriz da Silva still remembers her first home: a tiny room behind the kitchen of a beachfront apartment in Rio de Janeiro, where her mother worked as a maid.

The room was barely bigger than a closet, hot and stifling, she said, with only a small window for air. Ms. Silva shared the cramped space with her mother and older brother until she was 6.

“We lived like that — stuffed in a cubicle,” said Ms. Silva, 49, a geography teacher.

The experience convinced Ms. Silva that she could never have a maid’s room in her own home. So when she rented an aging apartment in a middle-class area of Rio, she swiftly turned the servant’s quarters into an office.

“The maid’s room is our colonial heritage,” Ms. Silva said. “It’s shameful.”

Many Brazilians increasingly feel the same way.

Maid’s rooms have been a fixture in Brazil’s homes for generations, a vestige of its long history of slavery and a tangible marker of inequality in a country where, after abolition, many affluent families relied on low paid, mostly Black domestic workers to clean, cook and care for children. Some worked around the clock for pennies; others toiled only in exchange for room and board.