The head of Google's operations in Brazil, Fabio Jose Silva Coelho, was arrested by Federal Police in Sao Paulo earlier this week for failing to take down YouTube videos that attacked a mayoral candidate.
Judge Flavio Peren of the court in Mato Grosso do Sul state ordered the removal of the videos last week. However, Google rejected the decision and refused to remove them. The Brazilian judge then ordered the arrest of the executive.
Authorities say the videos are slanderous towards the candidate, and it runs counter to the country's strict pre-vote electoral laws.
The videos reportedly make incendiary comments of the mayoral candidate in the city of Campo Grande, Alcides Bernal, accusing him of committing crimes.
Brazil's electoral law bans campaign ads that "offend the dignity or decorum" of a candidate.
The company is appealing, saying it is not responsible for content posted on its site.
Earlier this month a judge in Paraiba state ordered the imprisonment of another senior Google executive for refusing to take down a YouTube video mocking a mayoral candidate.
That order was overturned within days by another judge who said that "Google is not the intellectual author of the video, it did not post the file, and for that reason it cannot be punished for its propagation."
The legal challenges have brought broader questions about Google's responsibility for content posted on its websites.
On Tuesday, a Brazilian court in Sao Paulo banned the online anti-Islam movie "Innocence of Muslims" that has spawned deadly protests across the Muslim world.
Judge Gilson Delgado Miranda gave Google 10 days to remove versions of the film from YouTube, saying the company would be fined 10,000 Brazilian reais ($4,926) each day it refused to comply with the order.