The homemade device was discovered during police training at the national shrine of Our Lady of Aparecida where the pope is scheduled to preach and celebrate mass, CNN reported Tuesday.
A special tactical group detonated the device without causing any injuries. It was constructed out of a small plastic cylinder and duct tape.
Vatican officials said the pontiff requested the trip to the Marian shrine, said to be the largest in the world, because of his personal devotion to the Virgin Mary.
Pope Francis asked Brazilians for permission to spend time in their country after arriving in Rio de Janeiro Monday for the start of World Youth Day.
"I ask permission to come in and spend this week with you," the pope said to his somewhat startled hosts including President Dilma Rousseff. Francis said he wanted to "knock gently" on Brazil's door during his first overseas journey since becoming pope.
Despite its name, World Youth Day is actually a week long gathering of Catholic youth from around the world.
Hundreds of thousands of Catholic faithful lined the streets of Rio de Janeiro to provide Pope Francis with a rock star greeting.
Vatican Radio reported the pontiff's motorcade mistakenly took the wrong route from the airport and ended up being blocked by traffic.
At one point, the pope got out of his car and kissed a baby.
The pope planned to rest Tuesday before making the journey to Sao Paulo and the shrine of Our Lady of Aparecida.