Facebook spokesman Matt Steinfeld confirmed to technology website Ars Technica that executive Diego Dzodan has been released.
Dzodan was arrested in Sao Paulo followed an arrest warrant issued by a judge from the state of Sergipe after Facebook allegedly did not release messages, sent by WhatsApp - a messaging service owned by Facebook - which concerned a drug trafficking investigation.
Since late 2014, all WhatsApp messages sent between Android devices are end-to-end encrypted.
It means that not even parent company Facebook can access their plain text contents.
Facebook has maintained that WhatsApp is operated independently and that it has no staff in Brazil and does not store messages, making it impossible to comply with the court order.
In December, another Brazilian judge ordered the WhatsApp service to be blocked nationwide for 48 hours after the company refused to provide information as part of an investigation into a user of the app.
At the time, the judicial decision provoked a wave of criticisms in Brazil and Mark Zuckerberg, founder of Facebook, stated that he was "stupefied" and called it "a sad day for Brazil".