It is reported Everton paid around £25 million to Napoli.
Allan, 29, scored 11 goals and grabbed 16 assists in more than 200 appearances for Napoli across all competitions, and helped them claim the Coppa Italia last season.
"It is a real pleasure to sign for Everton. I am immensely happy to be here," Allan said in a club statement.
"I hope, like I have done in my entire career, I contribute with my performances together with my teammates and that I put in some great games, great performances and win important things."
Capped nine times by Brazil, Allan was part of the squad which won the Copa America in 2019.
At Everton, he will be reunited with manager Carlo Ancelotti, having previously played under the 61-year-old for two seasons while the Italian was in charge of Napoli.
"It is a club with a rich history in the Premier League, has real ambition and then there is Professor Ancelotti. He has done everything possible to bring me here," Allan said.
"It is the size of the club and the name of the coach which means you don't think twice about coming to Everton."
Everton finished 12th last term and begin their new Premier League campaign with a trip to Tottenham Hotspur on Sept. 13.