Allegri was dismissed shortly after Leonardo Balerdi scored a late equaliser for Roma. Allegri, who believed there was a foul during the build-up, reacted with anger when the VAR cleared the goal, leading to a straight red card.
The manager, who has also been fined €10,000 ($11,200), is set to miss the Serie A games at Monza on Wednesday and Juventus on Sunday as his 10th-placed Napoli side look for a turnaround after winning only one of their last four league matches.
In a statement, Napoli said they would lodge an appeal.
Allegri made an "abusive remark towards the match officials" and later, in the changing room, "adopted an aggressive attitude towards an official of the opposing team," the disciplinary authority said in a decision published on the league's website.
"Offences (were) noted by the fourth official (Juan Luca Sacchi) and the referee (Andrea Colombo), and the latter by officials from the Federal Prosecutor’s Office," the sports judge added.
Allegri in a post-match interview denied having abused the match officials. "The fourth official called the referee and got me sent off, but I said absolutely nothing," he told DAZN Italia.
