A police spokesman in Recife told AFP that the toddler's biological parents were arrested and jailed late Tuesday after failing to post bail set at $6,666 each.
The girl was turned over to the city's child protective services.
"The 23-year-old mother said she needed money to travel to Europe for prostitution. The 40-year-old father did not say anything," the spokesman added.
A social worker from Campina Grande in Paraiba state reported the couple to authorities after reaching a monetary agreement for the transaction on Facebook.
"I am relieved to have changed the future of this child," said the social worker, who initially thought the case was a joke.
Under the deal, she was due to pay an additional $890 in 10 installments.
The couple was arrested during the transaction.
"The husband did not take part in the online negotiations but was present during the delivery and held the child in his arms," Geraldo da Costa, the police officer in charge of the case, told the G1 news portal.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.