The factory was expected to be operational by March 2025 and was expected to be BYD's first electric vehicle factory outside of Asia.
The workers, hired by Jinjiang Construction Brazil, lived in four facilities in the town of Camaçari.
At one of those facilities, workers had to sleep on beds without mattresses, according to prosecutors.
Each bathroom was also shared by 31 workers, requiring them to get up extremely early to be ready for work.
“The conditions observed in the housing reveal an alarming picture of precariousness and degradation,” said the MPT.
“Slavery-like conditions,” as defined by Brazilian law, include debt bondage and work that violates human dignity.
The MPT added that this situation also constitutes “forced labor,” as many workers were denied wages and had to pay excessive fees to terminate their contracts.
BYD said the affected workers had been moved to hotels.
She added that she had carried out a “detailed review” of the working and living conditions of subcontractor employees and had “repeatedly” asked the construction company to make improvements.
BYD, short for Build Your Dreams, is one of the world's largest electric vehicle manufacturers.
It sold more electric vehicles than Elon Musk's Tesla in the final three months of 2023, as the two vied for top spot in the sector.
The company has also expanded its presence in Brazil, which is by far its largest foreign market.
It first opened a factory in São Paulo in 2015, producing chassis for electric buses.
Last year, it announced it would invest 3 billion reais ($484.2 million) in Brazil to build an electric vehicle manufacturing plant.
Electric vehicle sales in China have been boosted by government subsidies. which encourage consumers to swap their gasoline cars for electric or hybrid vehicles.
But there is a growing backlash abroad against what some see as unfair support from the Chinese government for domestic automakers.
Major markets like the US and EU have imposed tariffs on electric vehicles from China, and more tariffs are expected under the new administration of US President-elect Donald Trump.