“Hotel staff noticed something strange in his behaviour and called us,” police officer Vladimir Passos told AFP, adding that the culprit had wanted “to approach Neymar and the team”.
Passos said that the 22-year-old sports student had been arrested but was later released after being cautioned.
“The flaw was spotted and we’ve fixed it,” said Passos of how the man managed to get into the players’ hotel.
The Brazilian men’s team arrived in Goiania on Thursday morning from the Granja Comary national training centre at Teresopolis, in the mountains near Rio.
Barcelona striker Neymar is one of team’s three players aged over 23 years. Brazil play South Africa, Iraq and Denmark in Group A of the Olympic tournament.