They "might" have has something, prior to the Portuguese arriving there; however it was NOT "CARNIVAL"!
In Italy, Portugal,Spain, and France, during the Middle Ages, this was a BIG event, with different nations also throwing in some old pagan traditions, here and there.
Since these things evolved over time, it was natural for the same thing to happen in Brazil, into what it is today.